diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/suspend.h | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index dee416c5477f..0044483dd477 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -134,16 +134,42 @@ extern void mark_free_pages(struct zone *zone); | |||
134 | * | 134 | * |
135 | * All three methods must be assigned. | 135 | * All three methods must be assigned. |
136 | * | 136 | * |
137 | * @prepare: prepare system for hibernation | 137 | * @start: Tell the platform driver that we're starting hibernation. |
138 | * @enter: shut down system after state has been saved to disk | 138 | * Called right after shrinking memory and before freezing devices. |
139 | * @finish: finish/clean up after state has been reloaded | 139 | * |
140 | * @pre_restore: prepare system for the restoration from a hibernation image | 140 | * @pre_snapshot: Prepare the platform for creating the hibernation image. |
141 | * @restore_cleanup: clean up after a failing image restoration | 141 | * Called right after devices have been frozen and before the nonboot |
142 | * CPUs are disabled (runs with IRQs on). | ||
143 | * | ||
144 | * @finish: Restore the previous state of the platform after the hibernation | ||
145 | * image has been created *or* put the platform into the normal operation | ||
146 | * mode after the hibernation (the same method is executed in both cases). | ||
147 | * Called right after the nonboot CPUs have been enabled and before | ||
148 | * thawing devices (runs with IRQs on). | ||
149 | * | ||
150 | * @prepare: Prepare the platform for entering the low power state. | ||
151 | * Called right after the hibernation image has been saved and before | ||
152 | * devices are prepared for entering the low power state. | ||
153 | * | ||
154 | * @enter: Put the system into the low power state after the hibernation image | ||
155 | * has been saved to disk. | ||
156 | * Called after the nonboot CPUs have been disabled and all of the low | ||
157 | * level devices have been shut down (runs with IRQs off). | ||
158 | * | ||
159 | * @pre_restore: Prepare system for the restoration from a hibernation image. | ||
160 | * Called right after devices have been frozen and before the nonboot | ||
161 | * CPUs are disabled (runs with IRQs on). | ||
162 | * | ||
163 | * @restore_cleanup: Clean up after a failing image restoration. | ||
164 | * Called right after the nonboot CPUs have been enabled and before | ||
165 | * thawing devices (runs with IRQs on). | ||
142 | */ | 166 | */ |
143 | struct hibernation_ops { | 167 | struct hibernation_ops { |
168 | int (*start)(void); | ||
169 | int (*pre_snapshot)(void); | ||
170 | void (*finish)(void); | ||
144 | int (*prepare)(void); | 171 | int (*prepare)(void); |
145 | int (*enter)(void); | 172 | int (*enter)(void); |
146 | void (*finish)(void); | ||
147 | int (*pre_restore)(void); | 173 | int (*pre_restore)(void); |
148 | void (*restore_cleanup)(void); | 174 | void (*restore_cleanup)(void); |
149 | }; | 175 | }; |