Lines Matching +full:pm +full:- +full:bus
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * pm.h - Power management interface
55 * struct dev_pm_ops - device PM callbacks.
62 * registration of a child already in progress), it may return -EAGAIN, so
63 * that the PM core can execute it once again (e.g. after a new child has
69 * used to indicate to the PM core to leave the device in runtime suspend
70 * if applicable. Namely, if @prepare() returns a positive number, the PM
72 * runtime-suspended and it may be left in that state during the entire
77 * The PM core executes subsystem-level @prepare() for all devices before
93 * of the other devices that the PM core has unsuccessfully attempted to
95 * The PM core executes subsystem-level @complete() after it has executed
109 * depends on the device's subsystem (PM domain, device type, class or bus
110 * type), but generally the device must be quiescent after subsystem-level
112 * Subsystem-level @suspend() is executed for all devices after invoking
113 * subsystem-level @prepare() for all of them.
123 * requests (the device itself may be left in a low-power state, waiting
128 * Subsystem-level @resume() is executed for all devices after invoking
129 * subsystem-level @resume_noirq() for all of them.
135 * @freeze: Hibernation-specific, executed before creating a hibernation image.
138 * (with the notable exception of the PCI bus type) expect the driver-level
141 * Subsystem-level @freeze() is executed for all devices after invoking
142 * subsystem-level @prepare() for all of them.
148 * @thaw: Hibernation-specific, executed after creating a hibernation image OR
153 * Subsystem-level @thaw() is executed for all devices after invoking
154 * subsystem-level @thaw_noirq() for all of them. It also may be executed
160 * @poweroff: Hibernation-specific, executed after saving a hibernation image.
163 * Subsystem-level @poweroff() is executed for all devices after invoking
164 * subsystem-level @prepare() for all of them.
169 * @restore: Hibernation-specific, executed after restoring the contents of main
178 * It generally is expected that the device will be in a low-power state
179 * (appropriate for the target system sleep state) after subsystem-level
184 * put the device into the low-power state and configure it to generate
216 * This need not mean that the device should be put into a low-power state.
225 * necessary, put the device into the full-power state and restore its
229 * low-power state if all of the necessary conditions are satisfied.
230 * Check these conditions, and return 0 if it's appropriate to let the PM
236 * internal transitions to various low-power modes which are transparent
242 * callbacks are involved. First, the PM core executes callbacks provided by PM
243 * domains, device types, classes and bus types. They are the subsystem-level
246 * have to collaborate with the subsystem-level callbacks to achieve the goals
252 * @resume_noirq(), @thaw_noirq(), and @restore_noirq(), do not cause the PM
258 * allow the PM core to be modified in the future, so that it can avoid
268 * Again, as a rule these callbacks are executed by the PM core for subsystems
269 * (PM domains, device types, classes and bus types) and the subsystem-level
359 * Use this for defining a set of PM operations to be used in all situations
360 * (system suspend, hibernation or runtime PM).
362 * be different from the corresponding runtime PM callbacks, .runtime_suspend(),
386 * The following PM_EVENT_ messages are defined for the internal use of the PM
388 * hibernation code to convey the necessary information to the device PM core
393 * FREEZE System is going to hibernate, call ->prepare() and ->freeze()
396 * SUSPEND System is going to suspend, call ->prepare() and ->suspend()
399 * HIBERNATE Hibernation image has been saved, call ->prepare() and
400 * ->poweroff() for all devices.
403 * hibernation image, call ->prepare() and ->freeze() for all
406 * RESUME System is resuming, call ->resume() and ->complete() for all
409 * THAW Hibernation image has been created, call ->thaw() and
410 * ->complete() for all devices.
413 * image, call ->restore() and ->complete() for all devices.
417 * ->thaw() and ->complete() for all devices.
420 * kernel subsystems. They are never issued by the PM core.
426 * REMOTE_WAKEUP Remote-wakeup request was received from the device.
435 #define PM_EVENT_INVALID (-1)
480 * Device run-time power management status.
482 * These status labels are used internally by the PM core to indicate the
483 * current status of a device with respect to the PM core operations. They do
488 * bus type's ->runtime_resume() callback has completed
491 * RPM_SUSPENDED Device bus type's ->runtime_suspend() callback has
495 * RPM_RESUMING Device bus type's ->runtime_resume() callback is being
498 * RPM_SUSPENDING Device bus type's ->runtime_suspend() callback is being
510 * Device run-time power management request types.
514 * RPM_REQ_IDLE Run the device bus type's ->runtime_idle() callback
516 * RPM_REQ_SUSPEND Run the device bus type's ->runtime_suspend() callback
521 * RPM_REQ_RESUME Run the device bus type's ->runtime_resume() callback
553 * NO_DIRECT_COMPLETE: Do not apply direct-complete optimization to the device.
554 * SMART_PREPARE: Take the driver ->prepare callback return value into account.
558 * See Documentation/driver-api/pm/devices.rst for details.
569 bool in_dpm_list:1; /* Owned by the PM core */
570 bool is_prepared:1; /* Owned by the PM core */
575 bool early_init:1; /* Owned by the PM core */
576 bool direct_complete:1; /* Owned by the PM core */
585 bool no_pm_callbacks:1; /* Owned by the PM core */
586 unsigned int must_resume:1; /* Owned by the PM core */
630 * struct dev_pm_domain - power management domain representation.
635 * @activate: Called before executing probe routines for bus types and drivers.
640 * hibernation, system resume and during runtime PM transitions instead of
641 * subsystem-level and driver-level callbacks.
654 * suspend framework, based on the ->suspend() and ->resume() callbacks common
667 * a power-off reset, or it may have maintained state from the
675 * about how to quiesce that are specific to the bus or the device's type.
696 * A minimally power-aware driver treats all messages as SUSPEND, fully
697 * reinitializes its device during resume() -- whether or not it was reset
698 * during the suspend/resume cycle -- and can't issue wakeup events.
700 * More power-aware drivers may also use low power states at runtime as
702 * be able to use wakeup events to exit from runtime low-power states,
703 * or from system low-power states such as standby or suspend-to-RAM.