Skip to content

Commit c709414

Browse files
committed
[nrf fromtree] 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 <[email protected]> (cherry picked from commit b990082)
1 parent 15f47a6 commit c709414

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

soc/arm/nordic_nrf/common/poweroff.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
#include <zephyr/sys/poweroff.h>
77
#include <zephyr/toolchain.h>
88

9+
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
910
#include <hal/nrf_power.h>
11+
#else
12+
#include <hal/nrf_regulators.h>
13+
#endif
1014

1115
void z_sys_poweroff(void)
1216
{
17+
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
1318
nrf_power_system_off(NRF_POWER);
19+
#else
20+
nrf_regulators_system_off(NRF_REGULATORS);
21+
#endif
1422

1523
CODE_UNREACHABLE;
1624
}

0 commit comments

Comments
 (0)