power: Move pm subsystem to new power states

Migrate the whole pm subsystem to use new power states information
from power_state.h and get states and residency properties from
device tree.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2020-12-07 21:51:46 -08:00 committed by Anas Nashif
commit 579f7049c7
33 changed files with 327 additions and 473 deletions

View file

@ -150,7 +150,7 @@ static int spi_cc13xx_cc26xx_transceive(const struct device *dev,
#if defined(CONFIG_PM) && \
defined(CONFIG_PM_SLEEP_STATES)
pm_ctrl_disable_state(POWER_STATE_SLEEP_2);
pm_ctrl_disable_state(PM_STATE_STANDBY);
#endif
err = spi_cc13xx_cc26xx_configure(dev, config);
@ -187,7 +187,7 @@ static int spi_cc13xx_cc26xx_transceive(const struct device *dev,
done:
#if defined(CONFIG_PM) && \
defined(CONFIG_PM_SLEEP_STATES)
pm_ctrl_enable_state(POWER_STATE_SLEEP_2);
pm_ctrl_enable_state(PM_STATE_STANDBY);
#endif
spi_context_release(ctx, err);
return err;