fix(sleep): use pm_power_state_force for proper device power management

This commit is contained in:
Nick Winans
2022-05-06 13:14:23 -05:00
committed by Pete Johanson
parent d7ba7a1bee
commit 54747a52f9
2 changed files with 4 additions and 4 deletions

View File

@@ -176,10 +176,10 @@ static int ext_power_generic_init(const struct device *dev) {
#ifdef CONFIG_PM_DEVICE
static int ext_power_generic_pm_action(const struct device *dev, enum pm_device_action action) {
switch (action) {
case PM_DEVICE_ACTION_TURN_ON:
case PM_DEVICE_ACTION_RESUME:
ext_power_generic_enable(dev);
return 0;
case PM_DEVICE_ACTION_TURN_OFF:
case PM_DEVICE_ACTION_SUSPEND:
ext_power_generic_disable(dev);
return 0;
default: