pm: replace DEVICE_PM_* states with PM_DEVICE_*
Prefix device PM states with PM. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
2d39c01592
commit
2c7b763e47
52 changed files with 331 additions and 331 deletions
|
@ -333,7 +333,7 @@ static int i2c_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if ((new_state == DEVICE_PM_ACTIVE_STATE) &&
|
||||
if ((new_state == PM_DEVICE_ACTIVE_STATE) &&
|
||||
(new_state != get_dev_data(dev)->pm_state)) {
|
||||
Power_setDependency(PowerCC26XX_PERIPH_I2C0);
|
||||
IOCPinTypeI2c(get_dev_config(dev)->base,
|
||||
|
@ -346,11 +346,11 @@ static int i2c_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
|||
get_dev_data(dev)->pm_state = new_state;
|
||||
}
|
||||
} else {
|
||||
__ASSERT_NO_MSG(new_state == DEVICE_PM_LOW_POWER_STATE ||
|
||||
new_state == DEVICE_PM_SUSPEND_STATE ||
|
||||
new_state == DEVICE_PM_OFF_STATE);
|
||||
__ASSERT_NO_MSG(new_state == PM_DEVICE_LOW_POWER_STATE ||
|
||||
new_state == PM_DEVICE_SUSPEND_STATE ||
|
||||
new_state == PM_DEVICE_OFF_STATE);
|
||||
|
||||
if (get_dev_data(dev)->pm_state == DEVICE_PM_ACTIVE_STATE) {
|
||||
if (get_dev_data(dev)->pm_state == PM_DEVICE_ACTIVE_STATE) {
|
||||
I2CMasterIntDisable(get_dev_config(dev)->base);
|
||||
I2CMasterDisable(get_dev_config(dev)->base);
|
||||
/* Reset pin type to default GPIO configuration */
|
||||
|
@ -373,7 +373,7 @@ static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
|
||||
if (ctrl_command == PM_DEVICE_SET_POWER_STATE) {
|
||||
uint32_t new_state = *((const uint32_t *)context);
|
||||
|
||||
if (new_state != get_dev_data(dev)->pm_state) {
|
||||
|
@ -381,7 +381,7 @@ static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
|
|||
new_state);
|
||||
}
|
||||
} else {
|
||||
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
|
||||
__ASSERT_NO_MSG(ctrl_command == PM_DEVICE_GET_POWER_STATE);
|
||||
*((uint32_t *)context) = get_dev_data(dev)->pm_state;
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ static int i2c_cc13xx_cc26xx_init(const struct device *dev)
|
|||
int err;
|
||||
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
get_dev_data(dev)->pm_state = DEVICE_PM_ACTIVE_STATE;
|
||||
get_dev_data(dev)->pm_state = PM_DEVICE_ACTIVE_STATE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue