summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/extpower_gpio.c2
-rw-r--r--include/hooks.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/common/extpower_gpio.c b/common/extpower_gpio.c
index 7a5cb0f843..d027b3d221 100644
--- a/common/extpower_gpio.c
+++ b/common/extpower_gpio.c
@@ -55,4 +55,4 @@ static void extpower_init(void)
/* Enable interrupts, now that we've initialized */
gpio_enable_interrupt(GPIO_AC_PRESENT);
}
-DECLARE_HOOK(HOOK_INIT, extpower_init, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_INIT, extpower_init, HOOK_PRIO_INIT_EXTPOWER);
diff --git a/include/hooks.h b/include/hooks.h
index 944d44bd06..c691c19044 100644
--- a/include/hooks.h
+++ b/include/hooks.h
@@ -29,6 +29,8 @@ enum hook_priority {
HOOK_PRIO_INIT_POWER_BUTTON = HOOK_PRIO_FIRST + 4,
/* PWM inits before modules which might use it (fans, LEDs) */
HOOK_PRIO_INIT_PWM = HOOK_PRIO_FIRST + 5,
+ /* Extpower inits before modules which might use it (battery, LEDs) */
+ HOOK_PRIO_INIT_EXTPOWER = HOOK_PRIO_FIRST + 6,
/* Specific values to lump temperature-related hooks together */
HOOK_PRIO_TEMP_SENSOR = 6000,