Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / mt_sleep.h
1 #ifndef _MT_SLEEP_
2 #define _MT_SLEEP_
3
4 #include <linux/kernel.h>
5 #include <mach/mt_spm.h>
6 #include <mach/mt_spm_sleep.h>
7
8 /* defined in mt_spm.h */
9 #if 0
10 #define WAKE_SRC_TS (1U << 1)
11 #define WAKE_SRC_KP (1U << 2)
12 #define WAKE_SRC_WDT (1U << 3)
13 #define WAKE_SRC_GPT (1U << 4)
14 #define WAKE_SRC_EINT (1U << 5)
15 #define WAKE_SRC_CONN_WDT (1U << 6)
16 #define WAKE_SRC_CCIF_MD (1U << 8)
17 #define WAKE_SRC_LOW_BAT (1U << 9)
18 #define WAKE_SRC_CONN (1U << 10)
19 #define WAKE_SRC_USB_CD (1U << 14)
20 #define WAKE_SRC_USB_PDN (1U << 16)
21 #define WAKE_SRC_DBGSYS (1U << 18)
22 #define WAKE_SRC_UART0 (1U << 19)
23 #define WAKE_SRC_AFE (1U << 20)
24 #define WAKE_SRC_THERM (1U << 21)
25 #define WAKE_SRC_CIRQ (1U << 22)
26 #define WAKE_SRC_SYSPWREQ (1U << 24)
27 #define WAKE_SRC_MD_WDT (1U << 25)
28 #define WAKE_SRC_CPU0_IRQ (1U << 26)
29 #define WAKE_SRC_CPU1_IRQ (1U << 27)
30 #define WAKE_SRC_CPU2_IRQ (1U << 28)
31 #define WAKE_SRC_CPU3_IRQ (1U << 29)
32 #endif
33
34 #define WAKE_SRC_CFG_KEY (1U << 31)
35
36 extern int slp_set_wakesrc(u32 wakesrc, bool enable, bool ck26m_on);
37
38 extern wake_reason_t slp_get_wake_reason(void);
39 extern bool slp_will_infra_pdn(void);
40
41 extern void slp_module_init(void);
42
43 #endif