diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-19 12:42:35 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-19 13:08:58 -0700 |
commit | f4e772708bde3e4e1d184190a7f0be2417d2029a (patch) | |
tree | 4b668c02a9a6dca2704e6d0a8b3cb8e5c9e95b76 /chip/lm4/gpio.c | |
parent | d5d2159c6d215b3a0feca42d961985cd37603ca8 (diff) | |
download | chrome-ec-f4e772708bde3e4e1d184190a7f0be2417d2029a.tar.gz |
Added HOOK_INIT for driver module inits
This covers modules which need to initialize before task_start(), but
don't particularly care in what order they're initialized.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=if it boots, it works
Change-Id: I69829aac8d1c3c14ee04916a794b84bbf03a09eb
Diffstat (limited to 'chip/lm4/gpio.c')
-rw-r--r-- | chip/lm4/gpio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index a7c4f96163..114e1a37a1 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -7,6 +7,7 @@ #include "board.h" #include "gpio.h" +#include "hooks.h" #include "power_button.h" #include "registers.h" #include "task.h" @@ -116,7 +117,7 @@ int gpio_pre_init(void) } -int gpio_init(void) +static int gpio_init(void) { /* Enable IRQs now that pins are set up */ task_enable_irq(LM4_IRQ_GPIOA); @@ -141,6 +142,7 @@ int gpio_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); void gpio_set_alternate_function(int port, int mask, int func) |