diff options
-rw-r--r-- | chip/lm4/switch.c | 1 | ||||
-rw-r--r-- | common/extpower_gpio.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/chip/lm4/switch.c b/chip/lm4/switch.c index 0e5c1542af..135e722783 100644 --- a/chip/lm4/switch.c +++ b/chip/lm4/switch.c @@ -582,7 +582,6 @@ static void switch_init(void) *host_get_memmap(EC_MEMMAP_SWITCHES_VERSION) = 1; /* Enable interrupts, now that we've initialized */ - gpio_enable_interrupt(GPIO_AC_PRESENT); gpio_enable_interrupt(GPIO_LID_SWITCHn); gpio_enable_interrupt(GPIO_POWER_BUTTONn); gpio_enable_interrupt(GPIO_RECOVERYn); diff --git a/common/extpower_gpio.c b/common/extpower_gpio.c index 4643b245de..dccaed4958 100644 --- a/common/extpower_gpio.c +++ b/common/extpower_gpio.c @@ -36,3 +36,10 @@ void extpower_interrupt(enum gpio_signal signal) /* Trigger deferred notification of external power change */ hook_call_deferred(extpower_deferred, 0); } + +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); |