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
|
@ -141,7 +141,7 @@ static int spi_cc13xx_cc26xx_transceive(const struct device *dev,
|
|||
int err;
|
||||
|
||||
spi_context_lock(ctx, false, NULL, config);
|
||||
pm_policy_state_lock_get(PM_STATE_STANDBY);
|
||||
pm_policy_state_lock_get(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
|
||||
|
||||
err = spi_cc13xx_cc26xx_configure(dev, config);
|
||||
if (err) {
|
||||
|
@ -175,7 +175,7 @@ static int spi_cc13xx_cc26xx_transceive(const struct device *dev,
|
|||
spi_context_cs_control(ctx, false);
|
||||
|
||||
done:
|
||||
pm_policy_state_lock_put(PM_STATE_STANDBY);
|
||||
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
|
||||
spi_context_release(ctx, err);
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue