Skip to content

Commit

Permalink
doc: pm: Update system device pm
Browse files Browse the repository at this point in the history
Add new information about new property to
enable/disable device power management per
power state.

Signed-off-by: Flavio Ceolin <[email protected]>
  • Loading branch information
Flavio Ceolin committed Aug 3, 2023
1 parent 5a1143e commit 6106833
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions doc/services/pm/device.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,39 @@ When using this type, device power management is mostly done inside
:c:func:`pm_system_suspend()` along with entering a CPU or SOC power state.

If a decision to enter a CPU lower power state is made, the power management
subsystem will suspend devices before changing state. The subsystem takes care
of suspending devices following their initialization order, ensuring that
subsystem will check if the selected low power state triggers device power
management and then suspend devices before changing state. The subsystem takes
care of suspending devices following their initialization order, ensuring that
possible dependencies between them are satisfied. As soon as the CPU wakes up
from a sleep state, devices are resumed in the opposite order that they were
suspended.

The decision about suspending devices in a low power state is done checking
if the power state has the property ``zephyr,pm-device-enabled``. Here is an
example of a target with two low power states with only triggering device
power management:

.. code-block:: devicetree
/* Node in a DTS file */
cpus {
power-states {
state0: state0 {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <5000>;
exit-latency-us = <240>;
};
state1: state1 {
compatible = "zephyr,power-state";
power-state-name = "suspend-to-ram";
zephyr,pm-device-enabled;
min-residency-us = <8000>;
exit-latency-us = <360>;
};
};
};
.. note::

When using :ref:`pm-system`, device transitions can be run from the idle thread.
Expand Down

0 comments on commit 6106833

Please sign in to comment.