diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/suspend.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 083ffea7ba18..e1e3742733be 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -92,6 +92,13 @@ typedef int __bitwise suspend_state_t; | |||
92 | * @enter() and @wake(), even if any of them fails. It is executed after | 92 | * @enter() and @wake(), even if any of them fails. It is executed after |
93 | * a failing @prepare. | 93 | * a failing @prepare. |
94 | * | 94 | * |
95 | * @suspend_again: Returns whether the system should suspend again (true) or | ||
96 | * not (false). If the platform wants to poll sensors or execute some | ||
97 | * code during suspended without invoking userspace and most of devices, | ||
98 | * suspend_again callback is the place assuming that periodic-wakeup or | ||
99 | * alarm-wakeup is already setup. This allows to execute some codes while | ||
100 | * being kept suspended in the view of userland and devices. | ||
101 | * | ||
95 | * @end: Called by the PM core right after resuming devices, to indicate to | 102 | * @end: Called by the PM core right after resuming devices, to indicate to |
96 | * the platform that the system has returned to the working state or | 103 | * the platform that the system has returned to the working state or |
97 | * the transition to the sleep state has been aborted. | 104 | * the transition to the sleep state has been aborted. |
@@ -113,6 +120,7 @@ struct platform_suspend_ops { | |||
113 | int (*enter)(suspend_state_t state); | 120 | int (*enter)(suspend_state_t state); |
114 | void (*wake)(void); | 121 | void (*wake)(void); |
115 | void (*finish)(void); | 122 | void (*finish)(void); |
123 | bool (*suspend_again)(void); | ||
116 | void (*end)(void); | 124 | void (*end)(void); |
117 | void (*recover)(void); | 125 | void (*recover)(void); |
118 | }; | 126 | }; |