X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=drivers%2Fstaging%2Fandroid%2Fandroid_alarm.h;h=3a182fb91c0e8ce36dc8bd629282bc4619dab871;hb=6fa3eb70c07b7ce2061fd6602159ac2d45a7dc3d;hp=4fd32f337f9cbb878419794e966fe8b47851a75a;hpb=bcd5d1d978c70841d68c7a3725269df9d5a4abf8;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/drivers/staging/android/android_alarm.h b/drivers/staging/android/android_alarm.h index 4fd32f337f9c..3a182fb91c0e 100644 --- a/drivers/staging/android/android_alarm.h +++ b/drivers/staging/android/android_alarm.h @@ -16,50 +16,13 @@ #ifndef _LINUX_ANDROID_ALARM_H #define _LINUX_ANDROID_ALARM_H -#include -#include #include +#include -enum android_alarm_type { - /* return code bit numbers or set alarm arg */ - ANDROID_ALARM_RTC_WAKEUP, - ANDROID_ALARM_RTC, - ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, - ANDROID_ALARM_ELAPSED_REALTIME, - ANDROID_ALARM_SYSTEMTIME, - - ANDROID_ALARM_TYPE_COUNT, - - /* return code bit numbers */ - /* ANDROID_ALARM_TIME_CHANGE = 16 */ -}; - -enum android_alarm_return_flags { - ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP, - ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC, - ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = - 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, - ANDROID_ALARM_ELAPSED_REALTIME_MASK = - 1U << ANDROID_ALARM_ELAPSED_REALTIME, - ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME, - ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16 -}; - -/* Disable alarm */ -#define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4)) - -/* Ack last alarm and wait for next */ -#define ANDROID_ALARM_WAIT _IO('a', 1) - -#define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) -/* Set alarm */ -#define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) -#define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) -#define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) -#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) -#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) -#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) +#include "uapi/android_alarm.h" +extern void alarm_set_power_on(struct timespec new_pwron_time, bool logo); +extern void alarm_get_power_on(struct rtc_wkalrm *alm); #ifdef CONFIG_COMPAT #define ANDROID_ALARM_SET_COMPAT(type) ALARM_IOW(2, type, \ @@ -70,6 +33,10 @@ enum android_alarm_return_flags { struct compat_timespec) #define ANDROID_ALARM_SET_RTC_COMPAT _IOW('a', 5, \ struct compat_timespec) +#define ANDROID_ALARM_SET_IPO_COMPAT(type) ALARM_IOW(8, type, \ + struct compat_timespec) +#define ANDROID_ALARM_SET_AND_WAIT_IPO_COMPAT(type) ALARM_IOW(9, type, \ + struct compat_timespec) #define ANDROID_ALARM_IOCTL_NR(cmd) (_IOC_NR(cmd) & ((1<<4)-1)) #define ANDROID_ALARM_COMPAT_TO_NORM(cmd) \ ALARM_IOW(ANDROID_ALARM_IOCTL_NR(cmd), \