diff options
author | Keith Short <keithshort@chromium.org> | 2022-01-28 10:01:57 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-03-29 18:03:59 +0000 |
commit | 47becbcb7397f4c70ecf0dbac60b5f6e5bdd9ea3 (patch) | |
tree | f9dc4516af34e63eb149cdfcf0da02a30e79d82e | |
parent | 3e9e40c44077ce050df57b2d83dd6ddbe2797343 (diff) | |
download | chrome-ec-47becbcb7397f4c70ecf0dbac60b5f6e5bdd9ea3.tar.gz |
hooks: add HOOK_PRIO_POST_PWM
Add the HOOK_PRIO_POST_PWM alias for (HOOK_PRIO_INIT_PWM+1). This more
clearly identifies the intent of this priority level.
BUG=none
BRANCH=none
TEST=compare_build.sh
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I2a589f0841c713d34434d9aae89b05db0a42c86e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3553671
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r-- | common/led_pwm.c | 2 | ||||
-rw-r--r-- | include/hooks.h | 1 | ||||
-rw-r--r-- | zephyr/projects/skyrim/led.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/common/led_pwm.c b/common/led_pwm.c index 0150e73382..05fe21e82b 100644 --- a/common/led_pwm.c +++ b/common/led_pwm.c @@ -122,7 +122,7 @@ static void init_leds_off(void) set_pwm_led_enable(PWM_LED1, 1); #endif /* CONFIG_LED_PWM_COUNT >= 2 */ } -DECLARE_HOOK(HOOK_INIT, init_leds_off, HOOK_PRIO_INIT_PWM + 1); +DECLARE_HOOK(HOOK_INIT, init_leds_off, HOOK_PRIO_POST_PWM); #ifndef CONFIG_LED_PWM_TASK_DISABLED static uint8_t pulse_period; diff --git a/include/hooks.h b/include/hooks.h index 5ab2cdbba0..429b09c3d3 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -42,6 +42,7 @@ enum hook_priority { HOOK_PRIO_INIT_FAN = HOOK_PRIO_FIRST + 7, /* PWM inits before modules which might use it (LEDs) */ HOOK_PRIO_INIT_PWM = HOOK_PRIO_FIRST + 8, + HOOK_PRIO_POST_PWM = HOOK_PRIO_INIT_PWM + 1, /* SPI inits before modules which might use it (sensors) */ HOOK_PRIO_INIT_SPI = HOOK_PRIO_FIRST + 9, /* Extpower inits before modules which might use it (battery, LEDs) */ diff --git a/zephyr/projects/skyrim/led.c b/zephyr/projects/skyrim/led.c index c8a6fefb7c..c3841366b5 100644 --- a/zephyr/projects/skyrim/led.c +++ b/zephyr/projects/skyrim/led.c @@ -99,4 +99,4 @@ static void pwm_led_duty_init(void) pwm_set_duty(PWM_CH_LED_CHRG, 100); pwm_set_duty(PWM_CH_LED_FULL, 100); } -DECLARE_HOOK(HOOK_INIT, pwm_led_duty_init, HOOK_PRIO_INIT_PWM + 1); +DECLARE_HOOK(HOOK_INIT, pwm_led_duty_init, HOOK_PRIO_POST_PWM); |