Lines Matching +full:try +full:- +full:power +full:- +full:role

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * pm.h - Power management interface
39 * Device power management
45 extern const char power_group_name[]; /* = "power" */
55 * struct dev_pm_ops - device PM callbacks.
57 * @prepare: The principal role of this callback is to prevent new children of
62 * registration of a child already in progress), it may return -EAGAIN, so
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
95 * The PM core executes subsystem-level @complete() after it has executed
103 * @complete() can check the power.direct_complete flag of the device to
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.
137 * wakeup events or change its power state. The majority of subsystems
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.
146 * events or change its power state.
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
197 * The power state of the device should not be changed by either @freeze(),
215 * able to communicate with the CPU(s) and RAM due to power management.
216 * This need not mean that the device should be put into a low-power state.
218 * off, the device may remain at full power. If the device does go to low
219 * power and is capable of generating runtime wakeup events, remote wakeup
221 * its power state via an interrupt) should be enabled for it.
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.
233 * Several device power state transitions are externally visible, affecting
236 * internal transitions to various low-power modes which are transparent
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
262 * executed. However, a callback routine MUST NOT try to unregister the device
267 * There also are callbacks related to runtime power management of devices.
269 * (PM domains, device types, classes and bus types) and the subsystem-level
274 * Refer to Documentation/power/runtime_pm.rst for more information about the
275 * role of the @runtime_suspend(), @runtime_resume() and @runtime_idle()
276 * callbacks in device runtime power management.
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.
426 * REMOTE_WAKEUP Remote-wakeup request was received from the device.
435 #define PM_EVENT_INVALID (-1)
480 * Device run-time power management status.
484 * not reflect the actual power state of the device or its status as seen by the
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
519 * been inactive for as long as power.autosuspend_delay
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.
629 * struct dev_pm_domain - power management domain representation.
631 * @ops: Power management operations associated with this domain.
638 * Power domains provide callbacks that are executed during system suspend,
640 * subsystem-level and driver-level callbacks.
653 * suspend framework, based on the ->suspend() and ->resume() callbacks common
666 * a power-off reset, or it may have maintained state from the
678 * SUSPEND Quiesce, enter a low power device state appropriate for
682 * HIBERNATE Enter a low power device state appropriate for the hibernation
686 * but do NOT otherwise enter a low power device state, and do
695 * A minimally power-aware driver treats all messages as SUSPEND, fully
696 * reinitializes its device during resume() -- whether or not it was reset
697 * during the suspend/resume cycle -- and can't issue wakeup events.
699 * More power-aware drivers may also use low power states at runtime as
701 * be able to use wakeup events to exit from runtime low-power states,
702 * or from system low-power states such as standby or suspend-to-RAM.