Skip to content

Commit

Permalink
Make sure we fire SHUTDOWN_COMPLETE hooks when the AP goes down
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DHowett committed Jan 23, 2023
1 parent 2a7c3d3 commit 207d75a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions board/hx20/power_sequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 207d75a

Please sign in to comment.