diff options
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r-- | include/linux/suspend.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index bc7d6bb4cd8e..4af270ec2204 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -61,14 +61,15 @@ typedef int __bitwise suspend_state_t; | |||
61 | * before device drivers' late suspend callbacks are executed. It returns | 61 | * before device drivers' late suspend callbacks are executed. It returns |
62 | * 0 on success or a negative error code otherwise, in which case the | 62 | * 0 on success or a negative error code otherwise, in which case the |
63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), | 63 | * system cannot enter the desired sleep state (@prepare_late(), @enter(), |
64 | * @wake(), and @finish() will not be called in that case). | 64 | * and @wake() will not be called in that case). |
65 | * | 65 | * |
66 | * @prepare_late: Finish preparing the platform for entering the system sleep | 66 | * @prepare_late: Finish preparing the platform for entering the system sleep |
67 | * state indicated by @begin(). | 67 | * state indicated by @begin(). |
68 | * @prepare_late is called before disabling nonboot CPUs and after | 68 | * @prepare_late is called before disabling nonboot CPUs and after |
69 | * device drivers' late suspend callbacks have been executed. It returns | 69 | * device drivers' late suspend callbacks have been executed. It returns |
70 | * 0 on success or a negative error code otherwise, in which case the | 70 | * 0 on success or a negative error code otherwise, in which case the |
71 | * system cannot enter the desired sleep state (@enter() and @wake()). | 71 | * system cannot enter the desired sleep state (@enter() will not be |
72 | * executed). | ||
72 | * | 73 | * |
73 | * @enter: Enter the system sleep state indicated by @begin() or represented by | 74 | * @enter: Enter the system sleep state indicated by @begin() or represented by |
74 | * the argument if @begin() is not implemented. | 75 | * the argument if @begin() is not implemented. |
@@ -81,14 +82,15 @@ typedef int __bitwise suspend_state_t; | |||
81 | * resume callbacks are executed. | 82 | * resume callbacks are executed. |
82 | * This callback is optional, but should be implemented by the platforms | 83 | * This callback is optional, but should be implemented by the platforms |
83 | * that implement @prepare_late(). If implemented, it is always called | 84 | * that implement @prepare_late(). If implemented, it is always called |
84 | * after @enter(), even if @enter() fails. | 85 | * after @prepare_late and @enter(), even if one of them fails. |
85 | * | 86 | * |
86 | * @finish: Finish wake-up of the platform. | 87 | * @finish: Finish wake-up of the platform. |
87 | * @finish is called right prior to calling device drivers' regular suspend | 88 | * @finish is called right prior to calling device drivers' regular suspend |
88 | * callbacks. | 89 | * callbacks. |
89 | * This callback is optional, but should be implemented by the platforms | 90 | * This callback is optional, but should be implemented by the platforms |
90 | * that implement @prepare(). If implemented, it is always called after | 91 | * that implement @prepare(). If implemented, it is always called after |
91 | * @enter() and @wake(), if implemented, even if any of them fails. | 92 | * @enter() and @wake(), even if any of them fails. It is executed after |
93 | * a failing @prepare. | ||
92 | * | 94 | * |
93 | * @end: Called by the PM core right after resuming devices, to indicate to | 95 | * @end: Called by the PM core right after resuming devices, to indicate to |
94 | * the platform that the system has returned to the working state or | 96 | * the platform that the system has returned to the working state or |
@@ -286,6 +288,13 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
286 | { .notifier_call = fn, .priority = pri }; \ | 288 | { .notifier_call = fn, .priority = pri }; \ |
287 | register_pm_notifier(&fn##_nb); \ | 289 | register_pm_notifier(&fn##_nb); \ |
288 | } | 290 | } |
291 | |||
292 | /* drivers/base/power/wakeup.c */ | ||
293 | extern bool events_check_enabled; | ||
294 | |||
295 | extern bool pm_check_wakeup_events(void); | ||
296 | extern bool pm_get_wakeup_count(unsigned long *count); | ||
297 | extern bool pm_save_wakeup_count(unsigned long count); | ||
289 | #else /* !CONFIG_PM_SLEEP */ | 298 | #else /* !CONFIG_PM_SLEEP */ |
290 | 299 | ||
291 | static inline int register_pm_notifier(struct notifier_block *nb) | 300 | static inline int register_pm_notifier(struct notifier_block *nb) |