Skip to content

Commit

Permalink
fix: Fix external power settings load issue.
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
petejohanson committed Jul 4, 2024
1 parent 82eed0f commit e01f13f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/ext_power_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e01f13f

Please sign in to comment.