diff options
author | Keith Short <keithshort@chromium.org> | 2021-01-27 16:38:03 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-01 19:26:44 +0000 |
commit | 5574318e3d30fc1fc1774976baddddebbe14a053 (patch) | |
tree | fc891557726c639d35175589bb61061301771831 /board/volteer | |
parent | ea2d207cae0dc8f46247d2fb70b5f78053ee005a (diff) | |
download | chrome-ec-5574318e3d30fc1fc1774976baddddebbe14a053.tar.gz |
volteer: Add LED support for zephyr build
Add LED support to zephyr builds on Volteer.
BUG=b:174851299
BRANCH=none
TEST=make buildall
TEST=zmake testall
TEST=Verify power and charging LEDs on Volteer.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I5c39d407ee0d1aca91cbbd721b82073f0163f34f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657402
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 10 | ||||
-rw-r--r-- | board/volteer/led.c | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index bc9446c2af..e456f1e299 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -59,16 +59,6 @@ struct keyboard_scan_config keyscan_config = { }; /******************************************************************************/ - -static void board_init(void) -{ - /* Illuminate motherboard and daughter board LEDs equally to start. */ - pwm_enable(PWM_CH_LED4_SIDESEL, 1); - pwm_set_duty(PWM_CH_LED4_SIDESEL, 50); -} -DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); - -/******************************************************************************/ /* Physical fans. These are logically separate from pwm_channels. */ const struct fan_conf fan_conf_0 = { diff --git a/board/volteer/led.c b/board/volteer/led.c index 4486bcb912..c0ad9be6b0 100644 --- a/board/volteer/led.c +++ b/board/volteer/led.c @@ -102,3 +102,12 @@ static void led_set_charge_port_tick(void) pwm_set_duty(PWM_CH_LED4_SIDESEL, side_select_duty); } DECLARE_HOOK(HOOK_TICK, led_set_charge_port_tick, HOOK_PRIO_DEFAULT); + +static void board_led_init(void) +{ + /* Illuminate motherboard and daughter board LEDs equally to start. */ + pwm_enable(PWM_CH_LED4_SIDESEL, 1); + pwm_set_duty(PWM_CH_LED4_SIDESEL, 50); +} +DECLARE_HOOK(HOOK_INIT, board_led_init, HOOK_PRIO_DEFAULT); + |