pm: device: Align state names with system states
Change device pm states to the same pattern used by system power management. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
86a8ab5c2c
commit
0c607adb63
51 changed files with 258 additions and 258 deletions
|
@ -254,7 +254,7 @@ static int init_twim(const struct device *dev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
get_dev_data(dev)->pm_state = PM_DEVICE_ACTIVE_STATE;
|
||||
get_dev_data(dev)->pm_state = PM_DEVICE_STATE_ACTIVE;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -273,7 +273,7 @@ static int twim_nrfx_pm_control(const struct device *dev,
|
|||
|
||||
if (new_state != pm_current_state) {
|
||||
switch (new_state) {
|
||||
case PM_DEVICE_ACTIVE_STATE:
|
||||
case PM_DEVICE_STATE_ACTIVE:
|
||||
init_twim(dev);
|
||||
if (get_dev_data(dev)->dev_config) {
|
||||
i2c_nrfx_twim_configure(
|
||||
|
@ -282,10 +282,10 @@ static int twim_nrfx_pm_control(const struct device *dev,
|
|||
}
|
||||
break;
|
||||
|
||||
case PM_DEVICE_LOW_POWER_STATE:
|
||||
case PM_DEVICE_SUSPEND_STATE:
|
||||
case PM_DEVICE_OFF_STATE:
|
||||
if (pm_current_state != PM_DEVICE_ACTIVE_STATE) {
|
||||
case PM_DEVICE_STATE_LOW_POWER:
|
||||
case PM_DEVICE_STATE_SUSPEND:
|
||||
case PM_DEVICE_STATE_OFF:
|
||||
if (pm_current_state != PM_DEVICE_STATE_ACTIVE) {
|
||||
break;
|
||||
}
|
||||
nrfx_twim_uninit(&get_dev_config(dev)->twim);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue