From d163d4268ec2ff47074abc12d8c38aa7f9b69918 Mon Sep 17 00:00:00 2001 From: Bastien Beauchamp Date: Tue, 21 Jan 2025 08:27:25 -0500 Subject: [PATCH] soc: silabs: Fix EM4 enter for Silabs S2 SoCs Fix PM_STATE_SOFT_OFF to properly enter EM4. Signed-off-by: Bastien Beauchamp --- soc/silabs/common/soc_power_pmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soc/silabs/common/soc_power_pmgr.c b/soc/silabs/common/soc_power_pmgr.c index 1980c95a56b..d34b11bc60b 100644 --- a/soc/silabs/common/soc_power_pmgr.c +++ b/soc/silabs/common/soc_power_pmgr.c @@ -60,7 +60,9 @@ void pm_state_set(enum pm_state state, uint8_t substate_id) LOG_DBG("Entry to energy mode %d", energy_mode); - if (energy_mode != SL_POWER_MANAGER_EM0) { + if (energy_mode == SL_POWER_MANAGER_EM4) { + sl_power_manager_enter_em4(); + } else if (energy_mode != SL_POWER_MANAGER_EM0) { sl_power_manager_add_em_requirement(energy_mode); sl_power_manager_sleep(); k_cpu_idle();