From 1bb6819da8bebc1cfd592dca362c2024671a2402 Mon Sep 17 00:00:00 2001 From: Devin Lu Date: Wed, 8 Dec 2021 11:09:04 +0800 Subject: redrix: Blinking with each side LED while battery error. This patch fixes the battery error LED should be blinking on each side. BUG=b:208912133 BRANCH=none TEST=Verify LED blink quickly while battery error on each side. Signed-off-by: Devin Lu Change-Id: Ifaa2c5a09b32bdd1329839e6031d127fda2e66f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322216 Reviewed-by: Boris Mittelberg --- board/redrix/led.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/board/redrix/led.c b/board/redrix/led.c index ca98daaf63..96ccae2689 100644 --- a/board/redrix/led.c +++ b/board/redrix/led.c @@ -189,8 +189,15 @@ static void led_set_battery(void) } break; case PWR_STATE_ERROR: - set_active_port_color((battery_ticks & 0x1) ? - LED_AMBER : LED_OFF); + if (led_auto_control_is_enabled(EC_LED_ID_RIGHT_LED)) { + led_set_color_battery(RIGHT_PORT, (battery_ticks & 0x1) + ? LED_AMBER : LED_OFF); + } + + if (led_auto_control_is_enabled(EC_LED_ID_LEFT_LED)) { + led_set_color_battery(LEFT_PORT, (battery_ticks & 0x1) + ? LED_AMBER : LED_OFF); + } break; case PWR_STATE_CHARGE_NEAR_FULL: set_active_port_color(LED_WHITE); -- cgit v1.2.1