From 2b9deb824b9fa6bb22d73ccec4794ff51fabdfc7 Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Tue, 27 Jul 2021 00:14:52 -0500 Subject: [PATCH] feat(power): Update device power management Kconfig --- app/Kconfig | 2 +- app/src/ext_power_generic.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 68363d51..f23930b4 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -267,7 +267,7 @@ choice SYS_PM_POLICY default PM_POLICY_APP endchoice -config DEVICE_POWER_MANAGEMENT +config PM_DEVICE default y config ZMK_IDLE_SLEEP_TIMEOUT diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index 7464d428..d2ca14dc 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -32,7 +32,7 @@ struct ext_power_generic_data { #if IS_ENABLED(CONFIG_SETTINGS) bool settings_init; #endif -#ifdef CONFIG_DEVICE_POWER_MANAGEMENT +#ifdef CONFIG_PM_DEVICE uint32_t pm_state; #endif }; @@ -143,7 +143,7 @@ static int ext_power_generic_init(const struct device *dev) { return -EIO; } -#ifdef CONFIG_DEVICE_POWER_MANAGEMENT +#ifdef CONFIG_PM_DEVICE data->pm_state = DEVICE_PM_ACTIVE_STATE; #endif @@ -179,7 +179,7 @@ static int ext_power_generic_init(const struct device *dev) { return 0; } -#ifdef CONFIG_DEVICE_POWER_MANAGEMENT +#ifdef CONFIG_PM_DEVICE static int ext_power_generic_pm_control(const struct device *dev, uint32_t ctrl_command, void *context, device_pm_cb cb, void *arg) { int rc; @@ -210,7 +210,7 @@ static int ext_power_generic_pm_control(const struct device *dev, uint32_t ctrl_ return rc; } -#endif /* CONFIG_DEVICE_POWER_MANAGEMENT */ +#endif /* CONFIG_PM_DEVICE */ static const struct ext_power_generic_config config = { .label = DT_INST_GPIO_LABEL(0, control_gpios),