docs: pm: Device pm fixes and enhancements
- idle/runtime - Information about asynchronous calls and how to use the condition variable - More details about usage count Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
90be4b67cf
commit
62e2952a5a
1 changed files with 26 additions and 19 deletions
|
@ -376,11 +376,10 @@ Check Busy Status of All Devices API
|
||||||
|
|
||||||
Checks if any device is busy. The API returns 0 if no device in the system is busy.
|
Checks if any device is busy. The API returns 0 if no device in the system is busy.
|
||||||
|
|
||||||
Device Idle Power Management
|
Device Runtime Power Management
|
||||||
****************************
|
*******************************
|
||||||
|
|
||||||
|
The Device Runtime Power Management framework is an Active Power
|
||||||
The Device Idle Power Management framework is a Active Power
|
|
||||||
Management mechanism which reduces the overall system Power consumtion
|
Management mechanism which reduces the overall system Power consumtion
|
||||||
by suspending the devices which are idle or not being used while the
|
by suspending the devices which are idle or not being used while the
|
||||||
System is active or running.
|
System is active or running.
|
||||||
|
@ -388,32 +387,32 @@ System is active or running.
|
||||||
The framework uses :c:func:`pm_device_state_set()` API set the
|
The framework uses :c:func:`pm_device_state_set()` API set the
|
||||||
device power state accordingly based on the usage count.
|
device power state accordingly based on the usage count.
|
||||||
|
|
||||||
The interfaces and APIs provided by the Device Idle PM are
|
The interfaces and APIs provided by the Device Runtime PM are
|
||||||
designed to be generic and architecture independent.
|
designed to be generic and architecture independent.
|
||||||
|
|
||||||
Device Idle Power Management API
|
Device Runtime Power Management API
|
||||||
================================
|
===================================
|
||||||
|
|
||||||
The Device Drivers use these APIs to perform device idle power management
|
The Device Drivers use these APIs to perform device runtime power
|
||||||
operations on the devices.
|
management operations on the devices.
|
||||||
|
|
||||||
Enable Device Idle Power Management of a Device API
|
Enable Device Runtime Power Management of a Device API
|
||||||
---------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
void pm_device_enable(const struct device *dev);
|
void pm_device_enable(const struct device *dev);
|
||||||
|
|
||||||
Enables Idle Power Management of the device.
|
Enables Runtime Power Management of the device.
|
||||||
|
|
||||||
Disable Device Idle Power Management of a Device API
|
Disable Device Runtime Power Management of a Device API
|
||||||
----------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
void pm_device_disable(const struct device *dev);
|
void pm_device_disable(const struct device *dev);
|
||||||
|
|
||||||
Disables Idle Power Management of the device.
|
Disables Runtime Power Management of the device.
|
||||||
|
|
||||||
Resume Device asynchronously API
|
Resume Device asynchronously API
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
@ -423,7 +422,12 @@ Resume Device asynchronously API
|
||||||
int pm_device_get(const struct device *dev);
|
int pm_device_get(const struct device *dev);
|
||||||
|
|
||||||
Marks the device as being used. This API will asynchronously
|
Marks the device as being used. This API will asynchronously
|
||||||
bring the device to resume state. The API returns 0 on success.
|
bring the device to resume state if it was suspended. If the device
|
||||||
|
was already active, it just increments the device usage count.
|
||||||
|
The API returns 0 on success.
|
||||||
|
|
||||||
|
Device drivers can monitor this operation to finish calling
|
||||||
|
:c:func:`pm_device_wait`.
|
||||||
|
|
||||||
Resume Device synchronously API
|
Resume Device synchronously API
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
@ -444,9 +448,12 @@ Suspend Device asynchronously API
|
||||||
|
|
||||||
int pm_device_put(const struct device *dev);
|
int pm_device_put(const struct device *dev);
|
||||||
|
|
||||||
Marks the device as being released. This API asynchronously put
|
Releases a device. This API asynchronously puts the device to suspend
|
||||||
the device to suspend state if not already in suspend state.
|
state if not already in suspend state if the usage count of this device
|
||||||
The API returns 0 on success.
|
reaches 0.
|
||||||
|
|
||||||
|
Device drivers can monitor this operation to finish calling
|
||||||
|
:c:func:`pm_device_wait`.
|
||||||
|
|
||||||
Suspend Device synchronously API
|
Suspend Device synchronously API
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue