Skip to content

Commit e6d5c71

Browse files
committed
docs: pm: Update runtime PM documentation and release notes
Add new configuration options for runtime PM to the release notes, including stack size, priority, and system work queue usage. Update the runtime PM documentation to explain the implications of using the system work queue and disabling asynchronous operations. Include a new version of the sequence diagram for asynchronous operations. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 6e02edf commit e6d5c71

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

doc/releases/release-notes-4.2.rst

+10
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ New APIs and options
173173

174174
* :kconfig:option:`CONFIG_MQTT_VERSION_5_0`
175175

176+
* Power management
177+
178+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_USE_SYSTEM_WQ`
179+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_USE_DEDICATED_WQ`
180+
* :kconfig:option:`CONFIG_PM_DRIVER_NEEDS_DEDICATED_WQ`
181+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_DEDICATED_WQ_STACK_SIZE`
182+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_DEDICATED_WQ_PRIO`
183+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_DEDICATED_WQ_INIT_PRIO`
184+
* :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_ASYNC`
185+
176186
* Sockets
177187

178188
* :kconfig:option:`CONFIG_NET_SOCKETS_INET_RAW`

doc/services/pm/device_runtime.rst

+20-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,26 @@ be a problem if the operation is fast, e.g. a register toggle. However, the
107107
situation will not be the same if suspension involves sending packets through a
108108
slow bus. For this reason the device drivers can also make use of the
109109
:c:func:`pm_device_runtime_put_async` function. This function will schedule
110-
the suspend operation, again, if device is no longer used. The suspension will
111-
then be carried out when the system work queue gets the chance to run. The
112-
sequence diagram shown below illustrates this scenario.
110+
the suspend operation, again, if device is no longer used.
111+
112+
113+
By default, runtime PM operations are offloaded to the system work queue.
114+
However, device drivers must not perform any blocking operations during suspend, as
115+
this can stall the system work queue and negatively impact system responsiveness.
116+
117+
To address this, applications can configure runtime PM to use a dedicated work queue
118+
by enabling :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME_USE_DEDICATED_WQ`.
119+
120+
If blocking behavior is required—for example, when accessing a slow peripheral
121+
or waiting for a bus transaction—the PM subsystem work queue must be used instead.
122+
Drivers that require this behavior can explicitly request it by enabling
123+
:kconfig:option:`CONFIG_PM_DRIVER_NEEDS_DEDICATED_WQ`.
124+
125+
For targets with constrained resources that do not need asynchronous
126+
operations, this functionality can be disabled altogether by
127+
de-selecting :kconfig:option:`CONFIOG_PM_DEVICE_RUNTIME_ASYNC`, reducing
128+
memory usage and system complexity.
129+
113130

114131
.. figure:: images/devr-async-ops.svg
115132

0 commit comments

Comments
 (0)