pm: update pm_domain_register/pm_domain_unregister document

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-06-04 10:35:13 +08:00 committed by Xiang Xiao
parent 1933f9648d
commit 95c4463618
1 changed files with 38 additions and 0 deletions

View File

@ -81,6 +81,22 @@ All PM interfaces are declared in the file ``include/nuttx/power/pm.h``.
initialized (since they may attempt to register with the power
management subsystem).
.. c:function:: int pm_domain_register(int domain, FAR struct pm_callback_s *cb)
Called by a device driver in order to register to receive power
management event callbacks from specific domain.
Refer to the `Callbacks`_
section for more details.
:param domain: Identifies the target register domain
:param cb:
An instance of :c:struct:`pm_callback_s`
providing the driver callback functions.
:return:
Zero (``OK``) on success; otherwise a negated
``errno`` value is returned.
.. c:function:: int pm_register(FAR struct pm_callback_s *callbacks)
Called by a device driver in
@ -88,6 +104,8 @@ All PM interfaces are declared in the file ``include/nuttx/power/pm.h``.
Refer to the `Callbacks`_
section for more details.
Compatible kept, only register to PM_IDLE_DOMAIN by marcro.
:param callbacks:
An instance of :c:struct:`pm_callback_s`
providing the driver callback functions.
@ -96,6 +114,24 @@ All PM interfaces are declared in the file ``include/nuttx/power/pm.h``.
Zero (``OK``) on success; otherwise a negated
``errno`` value is returned.
.. c:function:: int pm_domain_unregister(int domain, FAR struct pm_callback_s *cb)
Called by a device driver in order to unregister previously
registered power management event from specific domain.
callbacks. Refer to the `Callbacks`_
section for more details.
**Input Parameters:**
:param domain: Identifies the target unregister domain
:param cb:
An instance of :c:struct:`pm_callback_s`
providing the driver callback functions.
:return:
Zero (``OK``) on success; otherwise a negated
``errno`` value is returned.
.. c:function:: int pm_unregister(FAR struct pm_callback_s *callbacks)
Called by a device driver in
@ -103,6 +139,8 @@ All PM interfaces are declared in the file ``include/nuttx/power/pm.h``.
callbacks. Refer to the `Callbacks`_
section for more details.
Compatible kept, only unregister with PM_IDLE_DOMAIN by marcro.
**Input Parameters:**
:param callbacks: