aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 13:31:12 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 13:31:12 -0400
commit3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch)
tree3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /include/linux/suspend.h
parent88d1dce3a74367291f65a757fbdcaf17f042f30c (diff)
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts: drivers/pci/quirks.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index a6977423baf7..e8e69159af71 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -86,6 +86,11 @@ typedef int __bitwise suspend_state_t;
86 * that implement @begin(), but platforms implementing @begin() should 86 * that implement @begin(), but platforms implementing @begin() should
87 * also provide a @end() which cleans up transitions aborted before 87 * also provide a @end() which cleans up transitions aborted before
88 * @enter(). 88 * @enter().
89 *
90 * @recover: Recover the platform from a suspend failure.
91 * Called by the PM core if the suspending of devices fails.
92 * This callback is optional and should only be implemented by platforms
93 * which require special recovery actions in that situation.
89 */ 94 */
90struct platform_suspend_ops { 95struct platform_suspend_ops {
91 int (*valid)(suspend_state_t state); 96 int (*valid)(suspend_state_t state);
@@ -94,6 +99,7 @@ struct platform_suspend_ops {
94 int (*enter)(suspend_state_t state); 99 int (*enter)(suspend_state_t state);
95 void (*finish)(void); 100 void (*finish)(void);
96 void (*end)(void); 101 void (*end)(void);
102 void (*recover)(void);
97}; 103};
98 104
99#ifdef CONFIG_SUSPEND 105#ifdef CONFIG_SUSPEND
@@ -149,7 +155,7 @@ extern void mark_free_pages(struct zone *zone);
149 * The methods in this structure allow a platform to carry out special 155 * The methods in this structure allow a platform to carry out special
150 * operations required by it during a hibernation transition. 156 * operations required by it during a hibernation transition.
151 * 157 *
152 * All the methods below must be implemented. 158 * All the methods below, except for @recover(), must be implemented.
153 * 159 *
154 * @begin: Tell the platform driver that we're starting hibernation. 160 * @begin: Tell the platform driver that we're starting hibernation.
155 * Called right after shrinking memory and before freezing devices. 161 * Called right after shrinking memory and before freezing devices.
@@ -189,6 +195,11 @@ extern void mark_free_pages(struct zone *zone);
189 * @restore_cleanup: Clean up after a failing image restoration. 195 * @restore_cleanup: Clean up after a failing image restoration.
190 * Called right after the nonboot CPUs have been enabled and before 196 * Called right after the nonboot CPUs have been enabled and before
191 * thawing devices (runs with IRQs on). 197 * thawing devices (runs with IRQs on).
198 *
199 * @recover: Recover the platform from a failure to suspend devices.
200 * Called by the PM core if the suspending of devices during hibernation
201 * fails. This callback is optional and should only be implemented by
202 * platforms which require special recovery actions in that situation.
192 */ 203 */
193struct platform_hibernation_ops { 204struct platform_hibernation_ops {
194 int (*begin)(void); 205 int (*begin)(void);
@@ -200,6 +211,7 @@ struct platform_hibernation_ops {
200 void (*leave)(void); 211 void (*leave)(void);
201 int (*pre_restore)(void); 212 int (*pre_restore)(void);
202 void (*restore_cleanup)(void); 213 void (*restore_cleanup)(void);
214 void (*recover)(void);
203}; 215};
204 216
205#ifdef CONFIG_HIBERNATION 217#ifdef CONFIG_HIBERNATION