diff options
author | David Huang <david.huang@quanta.corp-partner.google.com> | 2020-08-17 23:02:50 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-19 10:37:49 +0000 |
commit | 2def464b097d503b4e9e2d7b9586c05d5dfc5797 (patch) | |
tree | fbb73a1787dde4051ea4fd870033a81e61e5d108 | |
parent | bdee9264b270abc532366d2052094e4d1969ddbb (diff) | |
download | chrome-ec-2def464b097d503b4e9e2d7b9586c05d5dfc5797.tar.gz |
todor: Remove LED_SIDESEL_4_L function and config.
Remove LED_SIDESEL_4_L function and config.
BUG=b:163167407
BRANCH=master
TEST=make buildall success.
Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com>
Change-Id: I5fe952668543f3671c91da2b138e416a8f8e671c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2359625
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
-rw-r--r-- | board/todor/board.c | 12 | ||||
-rw-r--r-- | board/todor/board.h | 1 | ||||
-rw-r--r-- | board/todor/gpio.inc | 1 | ||||
-rw-r--r-- | board/todor/led.c | 26 |
4 files changed, 1 insertions, 39 deletions
diff --git a/board/todor/board.c b/board/todor/board.c index c2a0bfae97..ef0bbaf0a2 100644 --- a/board/todor/board.c +++ b/board/todor/board.c @@ -48,9 +48,7 @@ union volteer_cbi_fw_config fw_config_defaults = { 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); @@ -153,14 +151,6 @@ const struct pwm_t pwm_channels[] = { .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, .freq = 2400, }, - [PWM_CH_LED4_SIDESEL] = { - .channel = 7, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - /* Run at a higher frequency than the color PWM signals to avoid - * timing-based color shifts. - */ - .freq = 4800, - }, [PWM_CH_KBLIGHT] = { .channel = 3, .flags = 0, diff --git a/board/todor/board.h b/board/todor/board.h index 91a0f92b91..0414dd015f 100644 --- a/board/todor/board.h +++ b/board/todor/board.h @@ -160,7 +160,6 @@ enum pwm_channel { PWM_CH_LED1_BLUE = 0, PWM_CH_LED2_GREEN, PWM_CH_LED3_RED, - PWM_CH_LED4_SIDESEL, PWM_CH_KBLIGHT, PWM_CH_COUNT }; diff --git a/board/todor/gpio.inc b/board/todor/gpio.inc index 99741c28b7..21d3a80211 100644 --- a/board/todor/gpio.inc +++ b/board/todor/gpio.inc @@ -144,7 +144,6 @@ ALTERNATE(PIN_MASK(B, BIT(3) | BIT(2)), 0, MODULE_I2C, 0) /* This selects between an LED module on the motherboard and one on the daughter * board, to be controlled by LED_{1,2,3}_L. PWM allows driving both modules at * the same time. */ -ALTERNATE(PIN_MASK(6, BIT(0)), 0, MODULE_PWM, 0) /* LED_SIDESEL_4_L */ ALTERNATE(PIN_MASK(C, BIT(2) | BIT(3) | BIT(4)), 0, MODULE_PWM, 0) /* LED_{3,2,1}_L */ /* Keyboard pins */ diff --git a/board/todor/led.c b/board/todor/led.c index 735df935d2..c4053f0f10 100644 --- a/board/todor/led.c +++ b/board/todor/led.c @@ -5,10 +5,8 @@ * Power and battery LED control for Volteer */ -#include "charge_manager.h" #include "common.h" #include "ec_commands.h" -#include "hooks.h" #include "led_common.h" #include "led_pwm.h" #include "pwm.h" @@ -77,27 +75,3 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) return EC_SUCCESS; } - -/* Illuminates the LED on the side of the active charging port. If not charging, - * illuminates both LEDs. - */ -static void led_set_charge_port_tick(void) -{ - int port; - int side_select_duty; - - port = charge_manager_get_active_charge_port(); - switch (port) { - case 0: - side_select_duty = 100; - break; - case 1: - side_select_duty = 0; - break; - default: - side_select_duty = 50; - } - - pwm_set_duty(PWM_CH_LED4_SIDESEL, side_select_duty); -} -DECLARE_HOOK(HOOK_TICK, led_set_charge_port_tick, HOOK_PRIO_DEFAULT); |