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/pwm.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/pwm.c')
-rw-r--r-- | chip/lm4/pwm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index 7fc95f0124..0a37ffc5b8 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -8,6 +8,7 @@ #include "board.h" #include "console.h" #include "gpio.h" +#include "hooks.h" #include "pwm.h" #include "registers.h" #include "uart.h" @@ -272,7 +273,7 @@ DECLARE_CONSOLE_COMMAND(kblight, command_kblight); /*****************************************************************************/ /* Initialization */ -int pwm_init(void) +static int pwm_init(void) { volatile uint32_t scratch __attribute__((unused)); @@ -324,3 +325,4 @@ int pwm_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, pwm_init, HOOK_PRIO_DEFAULT); |