Skip to content

Commit aba960c

Browse files
committed
soc: nordic: nrf54h: power: Add custom suspend/resume calls
Add weak functions which allows to execute custom code during suspend or resume. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 2a7a86f commit aba960c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

soc/nordic/nrf54h/power.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818

1919
extern sys_snode_t soc_node;
2020

21+
__weak void nrf54h_custom_suspend(void)
22+
{
23+
}
24+
25+
__weak void nrf54h_custom_resume(void)
26+
{
27+
}
28+
2129
static void common_suspend(void)
2230
{
2331
if (IS_ENABLED(CONFIG_DCACHE)) {
@@ -36,6 +44,7 @@ static void common_suspend(void)
3644
}
3745

3846
soc_lrcconf_poweron_release(&soc_node, NRF_LRCCONF_POWER_DOMAIN_0);
47+
nrf54h_custom_suspend();
3948
}
4049

4150
static void common_resume(void)
@@ -55,6 +64,7 @@ static void common_resume(void)
5564
}
5665

5766
soc_lrcconf_poweron_request(&soc_node, NRF_LRCCONF_POWER_DOMAIN_0);
67+
nrf54h_custom_resume();
5868
}
5969

6070
void nrf_poweroff(void)

0 commit comments

Comments
 (0)