From 4d51bea08414920193930012dafd887e84fb130e Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 26 Apr 2024 00:03:18 +0100 Subject: [PATCH] doc: services: pm: document the "device list" command Document the "device list" command in the context of device power management. Signed-off-by: Fabio Baltieri --- doc/services/pm/device.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/services/pm/device.rst b/doc/services/pm/device.rst index 543f186e84..055591c5f2 100644 --- a/doc/services/pm/device.rst +++ b/doc/services/pm/device.rst @@ -249,6 +249,22 @@ option and issue a ``pm`` command on a device from the shell, for example: devices: - buttons (suspended) +To print the power management state of a device, enable +:kconfig:option:`CONFIG_DEVICE_SHELL` and use the ``device list`` command, for +example: + +.. code-block:: console + + uart:~$ device list + devices: + - i2c@40003000 (active) + - buttons (active, usage=1) + - leds (READY) + +In this case, ``leds`` does not support PM, ``i2c`` supports PM with manual +suspend and resume actions and it's currently active, ``buttons`` supports +runtime PM and it's currently active with one user. + .. _pm-device-busy: Busy Status Indication