temp revert rk change
[firefly-linux-kernel-4.4.55.git] / include / linux / gps-gpio-brcm4750.h
index d534ab7afe125c3648cd6ffd745bff23b30c91e2..8b30cd7622ebb233e3600836c8109391f9681075 100755 (executable)
 #ifndef _GPS_GPIO_BRCM4750_H_
 #define _GPS_GPIO_BRCM4750_H_
 
+#include <linux/android_alarm.h>
 #include <linux/ioctl.h>
+#include <linux/wakelock.h>
+#include <linux/wait.h>
+#include <linux/workqueue.h>
 
 #define GPS_GPIO_DRIVER_NAME "gps_brcm4750"
 
 
 #define IOC_GPS_GPIO_RESET       _IOW(GPS_GPIO_IOCTL_BASE, 0x0, int)
 #define IOC_GPS_GPIO_STANDBY     _IOW(GPS_GPIO_IOCTL_BASE, 0x1, int)
+/* start single shot wake up timer, set the value in msecs */
+#define IOC_GPS_START_TIMER      _IOW(GPS_GPIO_IOCTL_BASE, 0x2, int)
+/* stop wake up timer */
+#define IOC_GPS_STOP_TIMER       _IOW(GPS_GPIO_IOCTL_BASE, 0x3, int)
 
 #ifdef __KERNEL__
 struct gps_gpio_brcm4750_platform_data {
       void (*set_reset_gpio)(unsigned int gpio_val);
       void (*set_standby_gpio)(unsigned int gpio_val);
       void (*free_gpio)(void);
+      struct alarm alarm;
+      struct wake_lock gps_brcm4750_wake;
+      wait_queue_head_t gps_brcm4750_wq;
+      int timer_status;
 } __attribute__ ((packed));
 
 #endif  /* __KERNEL__ */