soc: npcx: make pm state setting functions overridable

This changes make PM state setting functions in SOC level weak so they
can be overridden by board/app level.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
This commit is contained in:
Tom Chang 2025-02-17 15:04:40 +08:00 committed by Carles Cufí
commit 6aefcf0c0a

View file

@ -199,7 +199,7 @@ static void npcx_power_enter_system_sleep(int slp_mode, int wk_mode)
}
/* Invoke when enter "Suspend/Low Power" mode. */
void pm_state_set(enum pm_state state, uint8_t substate_id)
__weak void pm_state_set(enum pm_state state, uint8_t substate_id)
{
if (state != PM_STATE_SUSPEND_TO_IDLE) {
LOG_DBG("Unsupported power state %u", state);
@ -228,7 +228,7 @@ void pm_state_set(enum pm_state state, uint8_t substate_id)
}
/* Handle soc specific activity after exiting "Suspend/Low Power" mode. */
void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id)
__weak void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id)
{
if (state != PM_STATE_SUSPEND_TO_IDLE) {
LOG_DBG("Unsupported power state %u", state);