From c187ce17648b4538be37615520d58ab6adfd333a Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Sat, 30 Jul 2022 15:19:14 -0500 Subject: [PATCH] Make sure we fire SHUTDOWN_COMPLETE hooks when the AP goes down This ensures that the hook in common/system.c that triggers an "at-shutdown" reboot from RO to RW fires. Without this, `ectool reboot_ec RW at-shutdown` doesn't work. --- board/hx20/power_sequence.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/hx20/power_sequence.c b/board/hx20/power_sequence.c index 530d4025b5..540ca47ee7 100644 --- a/board/hx20/power_sequence.c +++ b/board/hx20/power_sequence.c @@ -559,6 +559,10 @@ enum power_state power_handle_state(enum power_state state) gpio_set_level(GPIO_SYSON, 0); hook_notify(HOOK_CHIPSET_SHUTDOWN); cypd_set_power_active(POWER_S5); + + /* Call hooks after we remove power rails */ + hook_notify(HOOK_CHIPSET_SHUTDOWN_COMPLETE); + power_s5_up = 0; return POWER_S5; break;