aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2024-07-04 18:26:27 +0000
committerPete Johanson <[email protected]>2024-07-04 17:20:40 -0600
commite01f13f9f00c0646bbadffd89dae4c3cd7d00a58 (patch)
treefbf9a3c78d6019c6ff76083d548d104bf5d5905e /app/src
parent82eed0f5ddb05fc244385e0ac05704fbdec0c3ee (diff)
downloadzmk-e01f13f9f00c0646bbadffd89dae4c3cd7d00a58.tar.gz
zmk-e01f13f9f00c0646bbadffd89dae4c3cd7d00a58.zip
fix: Fix external power settings load issue.
* Because settings load is delayed now, enable external power on init, and let it be disabled on settings load later, to ensure power is on early for other peripheral initialization. Fixes: #2361
Diffstat (limited to 'app/src')
-rw-r--r--app/src/ext_power_generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c
index 5a9cc5b86a..17b3ba6402 100644
--- a/app/src/ext_power_generic.c
+++ b/app/src/ext_power_generic.c
@@ -151,11 +151,11 @@ static int ext_power_generic_init(const struct device *dev) {
#if IS_ENABLED(CONFIG_SETTINGS)
k_work_init_delayable(&ext_power_save_work, ext_power_save_state_work);
-#else
- // Default to the ext_power being open when no settings
- ext_power_enable(dev);
#endif
+ // Enable by default. We may get disabled again once settings load.
+ ext_power_enable(dev);
+
if (config->init_delay_ms) {
k_msleep(config->init_delay_ms);
}