pm: Account device pm state lock
Do not execute pm operations on devices that the device pm state is locked. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
097e08c71a
commit
0a32eadd13
4 changed files with 16 additions and 3 deletions
|
@ -298,6 +298,7 @@ const char *pm_device_state_str(enum pm_device_state state);
|
|||
* @retval -EALREADY If device is already at the requested state.
|
||||
* @retval -EBUSY If device is changing its state.
|
||||
* @retval -ENOSYS If device does not support PM.
|
||||
* @retval -EPERM If device has power state locked.
|
||||
* @retval Errno Other negative errno on failure.
|
||||
*/
|
||||
__deprecated int pm_device_state_set(const struct device *dev,
|
||||
|
@ -418,6 +419,8 @@ bool pm_device_wakeup_is_capable(const struct device *dev);
|
|||
* system power management or device runtime power
|
||||
* management until unlocked.
|
||||
*
|
||||
* @note The given device should not have device runtime enabled.
|
||||
*
|
||||
* @see pm_device_state_unlock
|
||||
*
|
||||
* @param dev Device instance.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue