Lines Matching +full:suspend +full:- +full:to +full:- +full:disk
1 /* SPDX-License-Identifier: GPL-2.0 */
103 * struct platform_suspend_ops - Callbacks for managing platform dependent
106 * @valid: Callback to determine if given system sleep state is supported by
109 * that it still may be impossible to enter given system sleep state if the
112 * assigned to this if the platform only supports mem sleep.
114 * @begin: Initialise a transition to given system sleep state.
115 * @begin() is executed right prior to suspending devices. The information
116 * conveyed to the platform code by @begin() should be disregarded by it as
120 * passed to @enter() is redundant and should be ignored.
125 * appropriate .suspend() method has been executed for each device) and
126 * before device drivers' late suspend callbacks are executed. It returns
134 * device drivers' late suspend callbacks have been executed. It returns
152 * @finish: Finish wake-up of the platform.
153 * @finish is called right prior to calling device drivers' regular suspend
160 * @suspend_again: Returns whether the system should suspend again (true) or
161 * not (false). If the platform wants to poll sensors or execute some
163 * suspend_again callback is the place assuming that periodic-wakeup or
164 * alarm-wakeup is already setup. This allows to execute some codes while
167 * @end: Called by the PM core right after resuming devices, to indicate to
168 * the platform that the system has returned to the working state or
169 * the transition to the sleep state has been aborted.
175 * @recover: Recover the platform from a suspend failure.
210 * suspend_set_ops - set platform dependent suspend operations
211 * @ops: The new suspend operations to set.
243 * pm_suspend_via_firmware - Check if platform firmware will suspend the system.
245 * To be called during system-wide power management transitions to sleep states
246 * or during the subsequent system-wide transitions back to the working state.
248 * Return 'true' if the platform firmware is going to be invoked at the end of
249 * the system-wide power management transition (to a sleep state) in progress in
250 * order to complete it, or if the platform firmware has been invoked in order
251 * to complete the last (or preceding) transition of the system to a sleep
254 * This matters if the caller needs or wants to carry out some special actions
255 * depending on whether or not control will be passed to the platform firmware
256 * subsequently (for example, the device may need to be reset before letting the
258 * firmware is not going to be invoked) or when such special actions may have
259 * been carried out during the preceding transition of the system to a sleep
260 * state (as they may need to be taken into account).
268 * pm_resume_via_firmware - Check if platform firmware has woken up the system.
270 * To be called during system-wide power management transitions from sleep
273 * Return 'true' if the platform firmware has passed control to the kernel at
274 * the beginning of the system-wide power management transition in progress, so
284 * pm_suspend_no_platform - Check if platform may change device power states.
286 * To be called during system-wide power management transitions to sleep states
287 * or during the subsequent system-wide transitions back to the working state.
290 * kernel throughout the system-wide suspend and resume cycle in progress (that
291 * is, if a device is put into a certain power state during suspend, it can be
292 * expected to remain in that state during resume).
299 /* Suspend-to-idle state machnine. */
302 S2IDLE_STATE_ENTER, /* Enter suspend-to-idle. */
303 S2IDLE_STATE_WAKE, /* Wake up from suspend-to-idle. */
319 * arch_suspend_disable_irqs - disable IRQs for suspend
322 * code and thus allows architectures to override it if more needs to be
323 * done. Not called for suspend to disk.
328 * arch_suspend_enable_irqs - enable IRQs after suspend
331 * code and thus allows architectures to override it if more needs to be
332 * done. Not called for suspend to disk.
352 static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } in pm_suspend()
361 * atomically during the resume from disk, because the page frames they have
362 * occupied before the suspend are in use.
371 * struct platform_hibernation_ops - hibernation platform support
373 * The methods in this structure allow a platform to carry out special
381 * @end: Called by the PM core right after resuming devices, to indicate to
382 * the platform that the system has returned to the working state.
399 * has been saved to disk.
405 * Called right after the control has been passed from the boot kernel to
417 * @recover: Recover the platform from a failure to suspend devices.
466 static inline int hibernate(void) { return -ENOSYS; } in hibernate()
471 return -ENOTSUPP; in hibernate_quiet_exec()
483 /* Hibernation and suspend events */
484 #define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
486 #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
487 #define PM_POST_SUSPEND 0x0004 /* Suspend finished */
488 #define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
602 * pm_pr_dbg - print pm sleep debug messages
605 * suspend, print message.