From b990082befd3a4890c11465262eb897bd383c1e6 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Tue, 8 Aug 2023 15:17:45 +0200 Subject: [PATCH] soc: arm: nordic_nrf: fix poweroff for nrf53/91 nRF53/91 require usage of nrf_regulators_system_off, so the API is not common with nRF51/52. This was an oversight during the conversion. Signed-off-by: Gerard Marull-Paretas --- soc/arm/nordic_nrf/common/poweroff.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/soc/arm/nordic_nrf/common/poweroff.c b/soc/arm/nordic_nrf/common/poweroff.c index 7474c94a74a..1c43da3e9ea 100644 --- a/soc/arm/nordic_nrf/common/poweroff.c +++ b/soc/arm/nordic_nrf/common/poweroff.c @@ -6,11 +6,19 @@ #include #include +#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) #include +#else +#include +#endif void z_sys_poweroff(void) { +#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X) nrf_power_system_off(NRF_POWER); +#else + nrf_regulators_system_off(NRF_REGULATORS); +#endif CODE_UNREACHABLE; }