diff options
Diffstat (limited to 'power/mt8186.c')
-rw-r--r-- | power/mt8186.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/power/mt8186.c b/power/mt8186.c index e6f104125e..bcaaa115df 100644 --- a/power/mt8186.c +++ b/power/mt8186.c @@ -326,6 +326,13 @@ enum power_state power_handle_state(enum power_state state) break; case POWER_G3S5: +#if DT_NODE_EXISTS(DT_NODELABEL(en_pp4200_s5)) + gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(en_pp4200_s5), 1); + if (power_wait_mask_signals_timeout(IN_PG_PP4200_S5, + IN_PG_PP4200_S5, + PG_PP4200_S5_DELAY)) + return POWER_S5G3; +#endif return POWER_S5; case POWER_S5S3: @@ -337,13 +344,6 @@ enum power_state power_handle_state(enum power_state state) power_signal_enable_interrupt(GPIO_AP_EC_WDTRST_L); power_signal_enable_interrupt(GPIO_AP_EC_WARM_RST_REQ); -#if DT_NODE_EXISTS(DT_NODELABEL(en_pp4200_s5)) - gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(en_pp4200_s5), 1); - - if (power_wait_mask_signals_timeout(PG_PP4200_S5, PG_PP4200_S5, - PG_PP4200_S5_DELAY)) - return POWER_S5G3; -#endif set_pmic_pwron(); GPIO_SET_LEVEL(GPIO_SYS_RST_ODL, 1); @@ -422,16 +422,15 @@ enum power_state power_handle_state(enum power_state state) if (is_shutdown) set_pmic_pwroff(); -#if DT_NODE_EXISTS(DT_NODELABEL(en_pp4200_s5)) - gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(en_pp4200_s5), 0); -#endif - hook_notify(HOOK_CHIPSET_SHUTDOWN_COMPLETE); is_shutdown = false; return POWER_S5; case POWER_S5G3: +#if DT_NODE_EXISTS(DT_NODELABEL(en_pp4200_s5)) + gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(en_pp4200_s5), 0); +#endif return POWER_G3; default: CPRINTS("Unexpected power state %d", state); |