Lines Matching full:power

1 Device Power Management
7 Device power management (PM) on Zephyr is a feature that enables devices to
10 selected, device drivers implementing power management will be able to take
11 advantage of the device power management subsystem.
13 Zephyr supports two methods of device power management:
15 - :ref:`Device Runtime Power Management <pm-device-runtime-pm>`
16 - :ref:`System-Managed Device Power Management <pm-device-system-pm>`
20 Device Runtime Power Management
23 Device runtime power management involves coordinated interaction between
25 play a crucial role in directly controlling the power state of
35 power state of devices. They interact directly with the hardware to
36 put devices into low-power states (suspend) when they are not in
38 :ref:`device runtime power management APIs <device_runtime_apis>` provided
39 by Zephyr to control the power state of devices.
42 and network, can also influence device power management.
50 power management as well. An application may have specific
51 requirements regarding device usage and power consumption. For
56 key to efficient device power management. For example, a device driver
59 the subsystem can use device runtime power management to ensure that
63 When using this Device Runtime Power Management, the System Power
64 Management subsystem is able to change power states quickly because it
72 System-Managed Device Power Management
75 The system managed device power management (PM) framework is a method where
76 devices are suspended along with the system entering a CPU (or SoC) power state.
78 When using this method, device power management is mostly done inside
81 If a decision to enter a CPU lower power state is made, the power management
82 subsystem will check if the selected low power state triggers device power
89 The decision about suspending devices when entering a low power state is done based on the
91 an example of a target with two low power states with only one triggering device power
98 power-states {
100 compatible = "zephyr,power-state";
101 power-state-name = "standby";
107 compatible = "zephyr,power-state";
108 power-state-name = "suspend-to-ram";
121 This method of device power management can be useful in the following scenarios:
125 power management.
126 - For devices that can not make any power management decision and have to be
133 :ref:`Device Runtime Power Management <pm-device-runtime-pm>` is the
134 **preferred** method for implementing device power management.
138 When using this method of device power management, the CPU will not
139 enter a low-power state if a device cannot be suspended. For example,
143 prevents the CPU from entering a low-power state is if the option
149 Devices are suspended only when the last active core is entering a low power
152 Device Power Management States
155 The power management subsystem defines device states in
156 :c:enum:`pm_device_state`. This method is used to track power states of
191 This is entirely done by the power management subsystem. Instead, drivers are
195 Device Model with Power Management Support
199 details on how these macros are used. A driver which implements device power
201 power management implementation.
204 power management resources required by a driver. These macros allocate the
205 driver-specific state which is required by the power management subsystem.
210 to initialize the power management field in each :c:struct:`device`.
212 Here is some example code showing how to implement device power management
233 * powered on the device, used when the power
240 * power off the device, used when the power
263 Power management actions can be triggered from shell commands for testing
276 To print the power management state of a device, enable
297 When the system is idle and the SoC is going to sleep, the power management
306 the system will not do power management on it. After the device is no
312 Device Power Management X System Power Management
315 When managing power in embedded systems, it's crucial to understand
316 the interplay between device power state and the overall system power
317 state. Some devices may have dependencies on the system power
318 state. For example, certain low-power states of the SoC might not
319 supply power to peripheral devices, leading to problems if the device
323 To avoid this sort of problem, devices must :ref:`get and release lock <pm-policy-power-states>`
324 power states that cause power loss during an operation.
326 Zephyr provides a mechanism for devices to declare which power states cause power
331 states cause power loss. In the following example, device ``test_dev``
332 says that power states ``state1`` and ``state2`` cause power loss.
336 power-states {
338 compatible = "zephyr,power-state";
339 power-state-name = "suspend-to-idle";
345 compatible = "zephyr,power-state";
346 power-state-name = "standby";
352 compatible = "zephyr,power-state";
353 power-state-name = "suspend-to-ram";
359 compatible = "zephyr,power-state";
360 power-state-name = "suspend-to-ram";
368 zephyr,disabling-power-states = <&state1 &state2>;
431 This property is **only** used by the system power management to identify
439 Some helpful examples showing device power management features: