chore: Various soft-off review fixes

* Code style to avoid goto.
* Enable pm.c compilation via dedicated Kconfig flag.
* Comment wakeup trigger PM behavior.
This commit is contained in:
Pete Johanson
2023-12-29 15:03:14 -08:00
parent fceb0351a5
commit 5ebe924e94
6 changed files with 26 additions and 12 deletions

View File

@@ -324,11 +324,9 @@ static int kscan_direct_init(const struct device *dev) {
static int kscan_direct_pm_action(const struct device *dev, enum pm_device_action action) {
switch (action) {
case PM_DEVICE_ACTION_SUSPEND:
kscan_direct_disable(dev);
break;
return kscan_direct_disable(dev);
case PM_DEVICE_ACTION_RESUME:
kscan_direct_enable(dev);
break;
return kscan_direct_enable(dev);
default:
return -ENOTSUP;
}

View File

@@ -427,11 +427,9 @@ static int kscan_matrix_init(const struct device *dev) {
static int kscan_matrix_pm_action(const struct device *dev, enum pm_device_action action) {
switch (action) {
case PM_DEVICE_ACTION_SUSPEND:
kscan_matrix_disable(dev);
break;
return kscan_matrix_disable(dev);
case PM_DEVICE_ACTION_RESUME:
kscan_matrix_enable(dev);
break;
return kscan_matrix_enable(dev);
default:
return -ENOTSUP;
}