Lines Matching +full:pm +full:- +full:bus

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * pm.h - Power management interface
63 * struct dev_pm_ops - device PM callbacks.
70 * registration of a child already in progress), it may return -EAGAIN, so
71 * that the PM core can execute it once again (e.g. after a new child has
77 * used to indicate to the PM core to leave the device in runtime suspend
78 * if applicable. Namely, if @prepare() returns a positive number, the PM
80 * runtime-suspended and it may be left in that state during the entire
85 * The PM core executes subsystem-level @prepare() for all devices before
101 * of the other devices that the PM core has unsuccessfully attempted to
103 * The PM core executes subsystem-level @complete() after it has executed
117 * depends on the device's subsystem (PM domain, device type, class or bus
118 * type), but generally the device must be quiescent after subsystem-level
120 * Subsystem-level @suspend() is executed for all devices after invoking
121 * subsystem-level @prepare() for all of them.
131 * requests (the device itself may be left in a low-power state, waiting
136 * Subsystem-level @resume() is executed for all devices after invoking
137 * subsystem-level @resume_noirq() for all of them.
143 * @freeze: Hibernation-specific, executed before creating a hibernation image.
146 * (with the notable exception of the PCI bus type) expect the driver-level
149 * Subsystem-level @freeze() is executed for all devices after invoking
150 * subsystem-level @prepare() for all of them.
156 * @thaw: Hibernation-specific, executed after creating a hibernation image OR
161 * Subsystem-level @thaw() is executed for all devices after invoking
162 * subsystem-level @thaw_noirq() for all of them. It also may be executed
168 * @poweroff: Hibernation-specific, executed after saving a hibernation image.
171 * Subsystem-level @poweroff() is executed for all devices after invoking
172 * subsystem-level @prepare() for all of them.
177 * @restore: Hibernation-specific, executed after restoring the contents of main
186 * It generally is expected that the device will be in a low-power state
187 * (appropriate for the target system sleep state) after subsystem-level
192 * put the device into the low-power state and configure it to generate
224 * This need not mean that the device should be put into a low-power state.
233 * necessary, put the device into the full-power state and restore its
237 * low-power state if all of the necessary conditions are satisfied.
238 * Check these conditions, and return 0 if it's appropriate to let the PM
244 * internal transitions to various low-power modes which are transparent
250 * callbacks are involved. First, the PM core executes callbacks provided by PM
251 * domains, device types, classes and bus types. They are the subsystem-level
254 * have to collaborate with the subsystem-level callbacks to achieve the goals
260 * @resume_noirq(), @thaw_noirq(), and @restore_noirq(), do not cause the PM
266 * allow the PM core to be modified in the future, so that it can avoid
276 * Again, as a rule these callbacks are executed by the PM core for subsystems
277 * (PM domains, device types, classes and bus types) and the subsystem-level
445 * Use this for defining a set of PM operations to be used in all situations
446 * (system suspend, hibernation or runtime PM).
448 * be different from the corresponding runtime PM callbacks, .runtime_suspend(),
481 * The following PM_EVENT_ messages are defined for the internal use of the PM
483 * hibernation code to convey the necessary information to the device PM core
488 * FREEZE System is going to hibernate, call ->prepare() and ->freeze()
491 * SUSPEND System is going to suspend, call ->prepare() and ->suspend()
494 * HIBERNATE Hibernation image has been saved, call ->prepare() and
495 * ->poweroff() for all devices.
498 * hibernation image, call ->prepare() and ->freeze() for all
501 * RESUME System is resuming, call ->resume() and ->complete() for all
504 * THAW Hibernation image has been created, call ->thaw() and
505 * ->complete() for all devices.
508 * image, call ->restore() and ->complete() for all devices.
512 * ->thaw() and ->complete() for all devices.
515 * kernel subsystems. They are never issued by the PM core.
521 * REMOTE_WAKEUP Remote-wakeup request was received from the device.
530 #define PM_EVENT_INVALID (-1)
575 * Device run-time power management status.
577 * These status labels are used internally by the PM core to indicate the
578 * current status of a device with respect to the PM core operations. They do
583 * bus type's ->runtime_resume() callback has completed
586 * RPM_SUSPENDED Device bus type's ->runtime_suspend() callback has
590 * RPM_RESUMING Device bus type's ->runtime_resume() callback is being
593 * RPM_SUSPENDING Device bus type's ->runtime_suspend() callback is being
598 RPM_INVALID = -1,
606 * Device run-time power management request types.
610 * RPM_REQ_IDLE Run the device bus type's ->runtime_idle() callback
612 * RPM_REQ_SUSPEND Run the device bus type's ->runtime_suspend() callback
617 * RPM_REQ_RESUME Run the device bus type's ->runtime_resume() callback
651 * NO_DIRECT_COMPLETE: Do not apply direct-complete optimization to the device.
652 * SMART_PREPARE: Take the driver ->prepare callback return value into account.
656 * See Documentation/driver-api/pm/devices.rst for details.
667 bool in_dpm_list:1; /* Owned by the PM core */
668 bool is_prepared:1; /* Owned by the PM core */
673 bool early_init:1; /* Owned by the PM core */
674 bool direct_complete:1; /* Owned by the PM core */
683 bool no_pm_callbacks:1; /* Owned by the PM core */
684 bool async_in_progress:1; /* Owned by the PM core */
685 bool must_resume:1; /* Owned by the PM core */
730 * struct dev_pm_domain - power management domain representation.
735 * @activate: Called before executing probe routines for bus types and drivers.
741 * hibernation, system resume and during runtime PM transitions instead of
742 * subsystem-level and driver-level callbacks.
756 * suspend framework, based on the ->suspend() and ->resume() callbacks common
769 * a power-off reset, or it may have maintained state from the
777 * about how to quiesce that are specific to the bus or the device's type.
798 * A minimally power-aware driver treats all messages as SUSPEND, fully
799 * reinitializes its device during resume() -- whether or not it was reset
800 * during the suspend/resume cycle -- and can't issue wakeup events.
802 * More power-aware drivers may also use low power states at runtime as
804 * be able to use wakeup events to exit from runtime low-power states,
805 * or from system low-power states such as standby or suspend-to-RAM.