Coral: Fix LED name for factory control led by ectool

Correct the LED name in led_set_brightness().

BRANCH=none
BUG=none
TEST=Use ectool led battery amber/blue/green/red to check LED status

Change-Id: I3de34000f9fa516d386aba6ebe42dd69cacd50c7
Signed-off-by: David Huang <David.Huang@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/760182
Reviewed-by: Scott Collyer <scollyer@chromium.org>
This commit is contained in:
david.huang
2017-11-09 16:08:56 +08:00
committed by chrome-bot
parent 063fc26720
commit a7c8b19aca

View File

@@ -161,13 +161,13 @@ void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
{
if (brightness[EC_LED_COLOR_BLUE] != 0)
led_set_color_battery(GPIO_LED_COLOR_2);
led_set_color_battery(LED_COLOR_2);
else if (brightness[EC_LED_COLOR_AMBER] != 0)
led_set_color_battery(GPIO_LED_COLOR_1);
led_set_color_battery(LED_COLOR_1);
else if (brightness[EC_LED_COLOR_RED] != 0)
led_set_color_battery(GPIO_LED_COLOR_2);
else if (brightness[EC_LED_COLOR_RED] != 0)
led_set_color_battery(GPIO_LED_COLOR_1);
led_set_color_battery(LED_COLOR_2);
else if (brightness[EC_LED_COLOR_GREEN] != 0)
led_set_color_battery(LED_COLOR_1);
else
led_set_color_battery(LED_OFF);