From 15092a17b2b93d948dc3724925ede724ad23d8f4 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Fri, 28 Jan 2022 10:01:57 -0700 Subject: hooks: add HOOK_PRIO_POST_POWER_BUTTON Add the HOOK_PRIO_POST_POWER_BUTTON alias for (HOOK_PRIO_INIT_POWER_BUTTON+1). This more clearly identifies the intent of this priority level. BUG=none BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short Change-Id: Icc009a74cb87d3fdec1360e00bb41fdbb10a6e8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553678 Reviewed-by: Denis Brockus --- common/power_button_x86.c | 2 +- include/hooks.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/power_button_x86.c b/common/power_button_x86.c index b87088e01d..ba972ca876 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -562,7 +562,7 @@ static void power_button_pulse_setting_restore_state(void) power_button_pulse_enabled = *state; } DECLARE_HOOK(HOOK_INIT, power_button_pulse_setting_restore_state, - HOOK_PRIO_INIT_POWER_BUTTON + 1); + HOOK_PRIO_POST_POWER_BUTTON); static void power_button_pulse_setting_preserve_state(void) { diff --git a/include/hooks.h b/include/hooks.h index 19ec2c52c3..d36c268986 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -40,6 +40,7 @@ enum hook_priority { HOOK_PRIO_POST_LID = HOOK_PRIO_INIT_LID + 1, /* Power button inits before chipset and switch */ HOOK_PRIO_INIT_POWER_BUTTON = HOOK_PRIO_FIRST + 5, + HOOK_PRIO_POST_POWER_BUTTON = HOOK_PRIO_INIT_POWER_BUTTON + 1, /* Init switch states after power button / lid */ HOOK_PRIO_INIT_SWITCH = HOOK_PRIO_FIRST + 6, /* Init fan before PWM */ -- cgit v1.2.1