Skip to content

Commit 1c6507a

Browse files
Flavio Ceolincfriedt
authored andcommitted
doc: pm: Add wakeup information
Add documentation for wakeup sources. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 69e57d6 commit 1c6507a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

doc/reference/power_management/index.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,44 @@ Check Busy Status of All Devices API
395395
396396
Checks if any device is busy. The API returns 0 if no device in the system is busy.
397397

398+
Wakeup capability
399+
-----------------
400+
401+
Some devices are capable of waking the system up from a sleep state.
402+
When a device has such capability, applications can enable or disable
403+
this feature on a device dynamically using
404+
:c:func:`pm_device_wakeup_enable`.
405+
406+
This property can be set on device declaring the property ``wakeup-source`` in
407+
the device node in devicetree. For example, this devicetree fragment sets the
408+
``gpio0`` device as a "wakeup" source:
409+
410+
.. code-block:: devicetree
411+
412+
gpio0: gpio@40022000 {
413+
compatible = "ti,cc13xx-cc26xx-gpio";
414+
reg = <0x40022000 0x400>;
415+
interrupts = <0 0>;
416+
status = "disabled";
417+
label = "GPIO_0";
418+
gpio-controller;
419+
wakeup-source;
420+
#gpio-cells = <2>;
421+
};
422+
423+
By default, "wakeup" capable devices do not have this functionality enabled
424+
during the device initialization. Applications can enable this functionality
425+
later calling :c:func:`pm_device_wakeup_enable`.
426+
427+
.. note::
428+
429+
This property is **only** used by the system power management to identify
430+
devices that should not be suspended.
431+
It is responsability of driver or the application to do any additional
432+
configuration required by the device to support it.
433+
434+
435+
398436
Device Runtime Power Management
399437
*******************************
400438

0 commit comments

Comments
 (0)