pm: policy: Consider substates for state lock functions
Extend the current pm_policy_state_lock_*() functions to support substates. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
parent
619fce9e0f
commit
69b28bfd07
19 changed files with 145 additions and 55 deletions
|
@ -196,7 +196,7 @@ static int i2c_cc13xx_cc26xx_transfer(const struct device *dev,
|
|||
|
||||
k_sem_take(&data->lock, K_FOREVER);
|
||||
|
||||
pm_policy_state_lock_get(PM_STATE_STANDBY);
|
||||
pm_policy_state_lock_get(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
|
||||
|
||||
for (int i = 0; i < num_msgs; i++) {
|
||||
/* Not supported by hardware */
|
||||
|
@ -218,7 +218,7 @@ static int i2c_cc13xx_cc26xx_transfer(const struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
pm_policy_state_lock_put(PM_STATE_STANDBY);
|
||||
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
|
||||
|
||||
k_sem_give(&data->lock);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue