2 * Copyright (C) 2010 Motorola, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 #ifndef _GPS_GPIO_BRCM4750_H_
20 #define _GPS_GPIO_BRCM4750_H_
22 #include <linux/android_alarm.h>
23 #include <linux/ioctl.h>
24 #include <linux/wakelock.h>
25 #include <linux/wait.h>
26 #include <linux/workqueue.h>
28 #define GPS_GPIO_DRIVER_NAME "gps_brcm4750"
30 #define GPS_GPIO_IOCTL_BASE 'w'
32 #define IOC_GPS_GPIO_RESET _IOW(GPS_GPIO_IOCTL_BASE, 0x0, int)
33 #define IOC_GPS_GPIO_STANDBY _IOW(GPS_GPIO_IOCTL_BASE, 0x1, int)
34 /* start single shot wake up timer, set the value in msecs */
35 #define IOC_GPS_START_TIMER _IOW(GPS_GPIO_IOCTL_BASE, 0x2, int)
36 /* stop wake up timer */
37 #define IOC_GPS_STOP_TIMER _IOW(GPS_GPIO_IOCTL_BASE, 0x3, int)
40 struct gps_gpio_brcm4750_platform_data {
41 void (*set_reset_gpio)(unsigned int gpio_val);
42 void (*set_standby_gpio)(unsigned int gpio_val);
43 void (*free_gpio)(void);
45 struct wake_lock gps_brcm4750_wake;
46 wait_queue_head_t gps_brcm4750_wq;
48 } __attribute__ ((packed));
50 #endif /* __KERNEL__ */
51 #endif /* _GPS_GPIO_BRCM4750_H_ */