From 11242691cde9777f47e95194e15595319caff106 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 7 Aug 2023 17:39:53 +0200 Subject: [PATCH] soc: arm: st_stm32: l0: remove unsupported state SOFT_OFF state (which translates to standby) doesn't seem to be supported according to the L0 DT files. Also, by definition soft off implies context loss, ie boot from scratch, but the implementation expected a call to the PM exit hook. Signed-off-by: Gerard Marull-Paretas --- soc/arm/st_stm32/stm32l0/power.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/soc/arm/st_stm32/stm32l0/power.c b/soc/arm/st_stm32/stm32l0/power.c index a2a11f824aa..bf7cc7bad11 100644 --- a/soc/arm/st_stm32/stm32l0/power.c +++ b/soc/arm/st_stm32/stm32l0/power.c @@ -41,12 +41,6 @@ void pm_state_set(enum pm_state state, uint8_t substate_id) LL_LPM_EnableDeepSleep(); k_cpu_idle(); break; - case PM_STATE_SOFT_OFF: - LL_PWR_ClearFlag_WU(); - LL_PWR_SetPowerMode(LL_PWR_MODE_STANDBY); - LL_LPM_EnableDeepSleep(); - k_cpu_idle(); - break; default: LOG_DBG("Unsupported power state %u", state); break; @@ -67,9 +61,6 @@ void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) /* Restore the clock setup. */ stm32_clock_control_init(NULL); break; - case PM_STATE_SOFT_OFF: - /* Nothing to do. */ - break; default: LOG_DBG("Unsupported power substate-id %u", state); break;