diff options
-rw-r--r-- | board/volteer/board.c | 10 | ||||
-rw-r--r-- | board/volteer/led.c | 9 | ||||
-rw-r--r-- | zephyr/projects/volteer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/projects/volteer/prj.conf | 4 |
4 files changed, 15 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); + diff --git a/zephyr/projects/volteer/CMakeLists.txt b/zephyr/projects/volteer/CMakeLists.txt index c1cd3505c4..21a941ac0b 100644 --- a/zephyr/projects/volteer/CMakeLists.txt +++ b/zephyr/projects/volteer/CMakeLists.txt @@ -50,5 +50,7 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_BATTERY "${PLATFORM_EC_BOARD}/battery.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_CBI "${PLATFORM_EC_BOARD}/cbi.c") +zephyr_sources_ifdef(CONFIG_PLATFORM_EC_LED_COMMON + "${PLATFORM_EC_BOARD}/led.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_USBC "${PLATFORM_EC_BOARD}/usbc_config.c") diff --git a/zephyr/projects/volteer/prj.conf b/zephyr/projects/volteer/prj.conf index b113b9af8c..60da6690ca 100644 --- a/zephyr/projects/volteer/prj.conf +++ b/zephyr/projects/volteer/prj.conf @@ -30,6 +30,10 @@ CONFIG_PLATFORM_EC_BATTERY_CUT_OFF=y CONFIG_PLATFORM_EC_BATTERY_HW_PRESENT_CUSTOM=y CONFIG_PLATFORM_EC_BATTERY_REVIVE_DISCONNECT=y +# LED +CONFIG_PLATFORM_EC_LED_COMMON=y +CONFIG_PLATFORM_EC_LED_PWM=y + # Power Sequencing CONFIG_PLATFORM_EC_POWERSEQ=y CONFIG_PLATFORM_EC_POWERSEQ_RTC_RESET=y |