pm: cleanup pm control callback implementations
- Return -ENOTSUP if the requested state is not supported - Remove redundant "noop style" functions. - Use switch everywhere to handle requested state (not necessary in all drivers, but better take off with consistency in place after current changes). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
d41dadc569
commit
495672ab62
33 changed files with 263 additions and 334 deletions
|
@ -231,6 +231,7 @@ static int twi_nrfx_pm_control(const struct device *dev,
|
|||
break;
|
||||
|
||||
case PM_DEVICE_STATE_SUSPENDED:
|
||||
__fallthrough;
|
||||
case PM_DEVICE_STATE_OFF:
|
||||
nrfx_twi_uninit(&get_dev_config(dev)->twi);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue