From 37e78175e5673682c8a5d9a4a7feb5d9b5534c60 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sun, 20 Mar 2022 09:13:43 +1000 Subject: [PATCH] doc: pm: document system pm limitations Document the limitations of system power management when it comes to transitions that are run from the idle thread. Signed-off-by: Jordan Yates --- doc/services/pm/device.rst | 6 ++++++ doc/services/pm/system.rst | 2 ++ 2 files changed, 8 insertions(+) diff --git a/doc/services/pm/device.rst b/doc/services/pm/device.rst index 7ffda9252cf..644806b3047 100644 --- a/doc/services/pm/device.rst +++ b/doc/services/pm/device.rst @@ -73,6 +73,12 @@ in transition between power states: * Gate/Un-gate power. * Mask/Un-mask interrupts. +.. note:: + + When using :ref:`pm-system`, device transitions can be run from the idle thread. + As functions in this context cannot block, transitions that intend to use blocking + API's **must** check whether they can do so with :c:func:`k_can_yield`. + Device Model with Power Management Support ****************************************** diff --git a/doc/services/pm/system.rst b/doc/services/pm/system.rst index 3e6b639309b..b6e7fb9f307 100644 --- a/doc/services/pm/system.rst +++ b/doc/services/pm/system.rst @@ -1,3 +1,5 @@ +.. _pm-system: + System Power Management #######################