| #ifndef __ASR_WAKEUP_DEFINES_H |
| #define __ASR_WAKEUP_DEFINES_H |
| |
| enum main_wakeup_list { |
| MAIN_WAKEUP_UNKNOW = 0, |
| MAIN_WAKEUP_GSM, |
| MAIN_WAKEUP_3GBB, |
| /* sub id of gpio wakeup is GPIO number */ |
| MAIN_WAKEUP_GPIO, |
| MAIN_WAKEUP_KEYPRESS, |
| MAIN_WAKEUP_TRACKBALL, |
| MAIN_WAKEUP_GMAC, |
| MAIN_WAKEUP_NEWROTARY, |
| MAIN_WAKEUP_WDT, |
| MAIN_WAKEUP_RTCALARM, |
| MAIN_WAKEUP_AP_TIMER0_2_TIMER1, |
| MAIN_WAKEUP_AP_TIMER0_2_TIMER2, |
| MAIN_WAKEUP_AP_TIMER0_2_TIMER3, |
| MAIN_WAKEUP_AP_TIMER1_1, |
| MAIN_WAKEUP_AP_TIMER1_2, |
| MAIN_WAKEUP_AP_TIMER1_3, |
| MAIN_WAKEUP_CP_TIMER1, |
| MAIN_WAKEUP_CP_TIMER2, |
| MAIN_WAKEUP_CP_TIMER3, |
| /* sub id of IRQ wakeup is the irq number, |
| * check /proc/interrupts to get the detailed info |
| */ |
| MAIN_WAKEUP_IRQ, |
| MAIN_WAKEUP_USB, |
| MAIN_WAKEUP_SQU_SDH1, |
| MAIN_WAKEUP_SDH23_HSI, |
| MAIN_WAKEUP_PMIC, |
| MAIN_WAKEUP_CP_IPC, |
| MAIN_WAKEUP_MISC, |
| }; |
| |
| #define GPIO_INT_HIGH_LELVE_NUM (1000) |
| |
| #define MAX_MAIN_WAKEUP_EVENT 6 |
| #define MAX_GPIO_WAKEUP_EVENT 6 |
| #define MAX_IRQ_WAKEUP_EVENT 6 |
| #define MAX_GPIO_INT_WAKEUP_EVENT 6 |
| |
| struct pm_wakeup_status { |
| u32 sys_main_wakeup_id[MAX_MAIN_WAKEUP_EVENT]; |
| u32 sys_gpio_wakeup_id[MAX_GPIO_WAKEUP_EVENT]; |
| u32 sys_irq_wakeup_id[MAX_IRQ_WAKEUP_EVENT]; |
| u16 main_wakeup_idx; |
| u16 gpio_wakeup_idx; |
| u16 irq_wakeup_idx; |
| }; |
| |
| /* sub id of MAIN_WAKEUP_CP_IPC definition */ |
| union cp_wakeup_struct { |
| struct { |
| unsigned int service_id:16; |
| unsigned int service_grp:8; |
| unsigned int reserved:3; |
| unsigned int wakeup_main_id:4; |
| unsigned int is_cp_wakeup:1; |
| } b; |
| unsigned int val; |
| }; |
| |
| enum { |
| CP_WAKEUP_MASTER_UNKNOWN = 0, |
| CP_WAKEUP_MASTER_PSD, |
| CP_WAKEUP_MASTER_MSOCKET, |
| CP_WAKEUP_MASTER_DIAG, |
| }; |
| |
| enum { |
| CP_WAKEUP_MAINID_UNKNOWN = 0, |
| CP_WAKEUP_MAINID_CI, |
| CP_WAKEUP_MAINID_NVM, |
| CP_WAKEUP_MAINID_IMS, |
| CP_WAKEUP_MAINID_AUDIO, |
| CP_WAKEUP_MAINID_DIAG, |
| CP_WAKEUP_MAINID_PSD, |
| CP_WAKEUP_MAINID_CISH, |
| }; |
| |
| //sub id of GPIO wakeup is the GPIO number, |
| //CP wakeup: read the sub id from telephony subsys |
| enum sub_sub_list { |
| SUB_WAKEUP_UNKNOW = 0, |
| }; |
| |
| |
| #define AP_WAKEUP_IOC_MAGIC 'W' |
| #define AP_WAKEUP_ENABLE_WAKEUP _IOW(AP_WAKEUP_IOC_MAGIC, 1, int) |
| #define AP_WAKEUP_DISABLE_WAKEUP _IOW(AP_WAKEUP_IOC_MAGIC, 2, int) |
| |
| |
| struct ap_wkup_ioctl_arg { |
| u32 arg1; |
| u32 arg2; |
| }; |
| |
| |
| enum wakeup_source_ctrl_list { |
| AP_WAKEUP_UNKNOWN, |
| AP_WAKEUP_RTC, |
| AP_WAKEUP_GPIO, |
| AP_WAKEUP_UART, |
| }; |
| |
| #endif /* __ASR_WAKEUP_DEFINES_H */ |