Lines Matching +full:wakeup +full:- +full:event +full:- +full:action
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * pm.h - Power management interface
50 int event; member
54 * struct dev_pm_ops - device PM callbacks.
61 * registration of a child already in progress), it may return -EAGAIN, so
71 * runtime-suspended and it may be left in that state during the entire
76 * The PM core executes subsystem-level @prepare() for all devices before
94 * The PM core executes subsystem-level @complete() after it has executed
107 * contents of main memory are preserved. The exact action to perform
109 * type), but generally the device must be quiescent after subsystem-level
111 * Subsystem-level @suspend() is executed for all devices after invoking
112 * subsystem-level @prepare() for all of them.
119 * contents of main memory were preserved. The exact action to perform
122 * requests (the device itself may be left in a low-power state, waiting
127 * Subsystem-level @resume() is executed for all devices after invoking
128 * subsystem-level @resume_noirq() for all of them.
134 * @freeze: Hibernation-specific, executed before creating a hibernation image.
136 * wakeup events or change its power state. The majority of subsystems
137 * (with the notable exception of the PCI bus type) expect the driver-level
140 * Subsystem-level @freeze() is executed for all devices after invoking
141 * subsystem-level @prepare() for all of them.
144 * @suspend_late(), but it should not enable the device to signal wakeup
147 * @thaw: Hibernation-specific, executed after creating a hibernation image OR
152 * Subsystem-level @thaw() is executed for all devices after invoking
153 * subsystem-level @thaw_noirq() for all of them. It also may be executed
159 * @poweroff: Hibernation-specific, executed after saving a hibernation image.
162 * Subsystem-level @poweroff() is executed for all devices after invoking
163 * subsystem-level @prepare() for all of them.
168 * @restore: Hibernation-specific, executed after restoring the contents of main
177 * It generally is expected that the device will be in a low-power state
178 * (appropriate for the target system sleep state) after subsystem-level
180 * system wakeup signals and is enabled to wake up the system, it should be
183 * put the device into the low-power state and configure it to generate
184 * wakeup signals, in which case it generally is not necessary to define
198 * signal system wakeup by any of these callbacks.
215 * This need not mean that the device should be put into a low-power state.
218 * power and is capable of generating runtime wakeup events, remote wakeup
223 * wakeup event generated by hardware or at the request of software. If
224 * necessary, put the device into the full-power state and restore its
228 * low-power state if all of the necessary conditions are satisfied.
235 * internal transitions to various low-power modes which are transparent
242 * domains, device types, classes and bus types. They are the subsystem-level
245 * have to collaborate with the subsystem-level callbacks to achieve the goals
268 * (PM domains, device types, classes and bus types) and the subsystem-level
392 * FREEZE System is going to hibernate, call ->prepare() and ->freeze()
395 * SUSPEND System is going to suspend, call ->prepare() and ->suspend()
398 * HIBERNATE Hibernation image has been saved, call ->prepare() and
399 * ->poweroff() for all devices.
402 * hibernation image, call ->prepare() and ->freeze() for all
405 * RESUME System is resuming, call ->resume() and ->complete() for all
408 * THAW Hibernation image has been created, call ->thaw() and
409 * ->complete() for all devices.
412 * image, call ->restore() and ->complete() for all devices.
416 * ->thaw() and ->complete() for all devices.
425 * REMOTE_WAKEUP Remote-wakeup request was received from the device.
434 #define PM_EVENT_INVALID (-1)
455 #define PMSG_INVALID ((struct pm_message){ .event = PM_EVENT_INVALID, })
456 #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, })
457 #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, })
458 #define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, })
459 #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, })
460 #define PMSG_HIBERNATE ((struct pm_message){ .event = PM_EVENT_HIBERNATE, })
461 #define PMSG_RESUME ((struct pm_message){ .event = PM_EVENT_RESUME, })
462 #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, })
463 #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, })
464 #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, })
466 { .event = PM_EVENT_USER_SUSPEND, })
468 { .event = PM_EVENT_USER_RESUME, })
470 { .event = PM_EVENT_REMOTE_RESUME, })
472 { .event = PM_EVENT_AUTO_SUSPEND, })
474 { .event = PM_EVENT_AUTO_RESUME, })
476 #define PMSG_IS_AUTO(msg) (((msg).event & PM_EVENT_AUTO) != 0)
479 * Device run-time power management status.
487 * bus type's ->runtime_resume() callback has completed
490 * RPM_SUSPENDED Device bus type's ->runtime_suspend() callback has
494 * RPM_RESUMING Device bus type's ->runtime_resume() callback is being
497 * RPM_SUSPENDING Device bus type's ->runtime_suspend() callback is being
509 * Device run-time power management request types.
513 * RPM_REQ_IDLE Run the device bus type's ->runtime_idle() callback
515 * RPM_REQ_SUSPEND Run the device bus type's ->runtime_suspend() callback
520 * RPM_REQ_RESUME Run the device bus type's ->runtime_resume() callback
554 * NO_DIRECT_COMPLETE: Do not apply direct-complete optimization to the device.
555 * SMART_PREPARE: Take the driver ->prepare callback return value into account.
559 * See Documentation/driver-api/pm/devices.rst for details.
583 struct wakeup_source *wakeup; member
631 * struct dev_pm_domain - power management domain representation.
642 * subsystem-level and driver-level callbacks.
655 * suspend framework, based on the ->suspend() and ->resume() callbacks common
668 * a power-off reset, or it may have maintained state from the
682 * wakeup events as appropriate.
685 * state (eg. ACPI S4) and enable wakeup events as appropriate.
689 * NOT emit system wakeup events.
697 * A minimally power-aware driver treats all messages as SUSPEND, fully
698 * reinitializes its device during resume() -- whether or not it was reset
699 * during the suspend/resume cycle -- and can't issue wakeup events.
701 * More power-aware drivers may also use low power states at runtime as
703 * be able to use wakeup events to exit from runtime low-power states,
704 * or from system low-power states such as standby or suspend-to-RAM.