Lines Matching +full:suspend +full:- +full:to +full:- +full:disk
1 /* SPDX-License-Identifier: GPL-2.0 */
44 * struct platform_suspend_ops - Callbacks for managing platform dependent
47 * @valid: Callback to determine if given system sleep state is supported by
50 * that it still may be impossible to enter given system sleep state if the
53 * assigned to this if the platform only supports mem sleep.
55 * @begin: Initialise a transition to given system sleep state.
56 * @begin() is executed right prior to suspending devices. The information
57 * conveyed to the platform code by @begin() should be disregarded by it as
61 * passed to @enter() is redundant and should be ignored.
66 * appropriate .suspend() method has been executed for each device) and
67 * before device drivers' late suspend callbacks are executed. It returns
75 * device drivers' late suspend callbacks have been executed. It returns
93 * @finish: Finish wake-up of the platform.
94 * @finish is called right prior to calling device drivers' regular suspend
101 * @suspend_again: Returns whether the system should suspend again (true) or
102 * not (false). If the platform wants to poll sensors or execute some
104 * suspend_again callback is the place assuming that periodic-wakeup or
105 * alarm-wakeup is already setup. This allows to execute some codes while
108 * @end: Called by the PM core right after resuming devices, to indicate to
109 * the platform that the system has returned to the working state or
110 * the transition to the sleep state has been aborted.
116 * @recover: Recover the platform from a suspend failure.
151 * suspend_set_ops - set platform dependent suspend operations
152 * @ops: The new suspend operations to set.
184 * pm_suspend_via_firmware - Check if platform firmware will suspend the system.
186 * To be called during system-wide power management transitions to sleep states
187 * or during the subsequent system-wide transitions back to the working state.
189 * Return 'true' if the platform firmware is going to be invoked at the end of
190 * the system-wide power management transition (to a sleep state) in progress in
191 * order to complete it, or if the platform firmware has been invoked in order
192 * to complete the last (or preceding) transition of the system to a sleep
195 * This matters if the caller needs or wants to carry out some special actions
196 * depending on whether or not control will be passed to the platform firmware
197 * subsequently (for example, the device may need to be reset before letting the
199 * firmware is not going to be invoked) or when such special actions may have
200 * been carried out during the preceding transition of the system to a sleep
201 * state (as they may need to be taken into account).
209 * pm_resume_via_firmware - Check if platform firmware has woken up the system.
211 * To be called during system-wide power management transitions from sleep
214 * Return 'true' if the platform firmware has passed control to the kernel at
215 * the beginning of the system-wide power management transition in progress, so
225 * pm_suspend_no_platform - Check if platform may change device power states.
227 * To be called during system-wide power management transitions to sleep states
228 * or during the subsequent system-wide transitions back to the working state.
231 * kernel throughout the system-wide suspend and resume cycle in progress (that
232 * is, if a device is put into a certain power state during suspend, it can be
233 * expected to remain in that state during resume).
240 /* Suspend-to-idle state machnine. */
243 S2IDLE_STATE_ENTER, /* Enter suspend-to-idle. */
244 S2IDLE_STATE_WAKE, /* Wake up from suspend-to-idle. */
260 * arch_suspend_disable_irqs - disable IRQs for suspend
263 * code and thus allows architectures to override it if more needs to be
264 * done. Not called for suspend to disk.
269 * arch_suspend_enable_irqs - enable IRQs after suspend
272 * code and thus allows architectures to override it if more needs to be
273 * done. Not called for suspend to disk.
293 static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } in pm_suspend()
302 * atomically during the resume from disk, because the page frames they have
303 * occupied before the suspend are in use.
312 * struct platform_hibernation_ops - hibernation platform support
314 * The methods in this structure allow a platform to carry out special
322 * @end: Called by the PM core right after resuming devices, to indicate to
323 * the platform that the system has returned to the working state.
340 * has been saved to disk.
346 * Called right after the control has been passed from the boot kernel to
358 * @recover: Recover the platform from a failure to suspend devices.
407 static inline int hibernate(void) { return -ENOSYS; } in hibernate()
412 return -ENOTSUPP; in hibernate_quiet_exec()
424 /* Hibernation and suspend events */
425 #define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
427 #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
428 #define PM_POST_SUSPEND 0x0004 /* Suspend finished */
429 #define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
543 * pm_pr_dbg - print pm sleep debug messages
546 * suspend, print message.