doc: services: pm: mention the pm shell option

Add a paragraph about the CONFIG_PM_DEVICE_SHELL option and how to use
it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2024-04-23 17:24:45 +01:00 committed by Anas Nashif
parent c5003e0eb1
commit a466fb05d0

View file

@ -231,6 +231,24 @@ support in a device driver.
PM_DEVICE_DT_INST_GET(0), NULL, NULL, POST_KERNEL,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
.. _pm-device-shell:
Shell Commands
**************
Power management actions can be triggered from shell commands for testing
purposes. To do that, enable the :kconfig:option:`CONFIG_PM_DEVICE_SHELL`
option and issue a ``pm`` command on a device from the shell, for example:
.. code-block:: console
uart:~$ device list
- buttons (active)
uart:~$ pm suspend buttons
uart:~$ device list
devices:
- buttons (suspended)
.. _pm-device-busy:
Busy Status Indication