From 35387474a1a03209aee02463ad53e300b4d1d938 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 13 Mar 2017 09:47:25 -0700 Subject: [PATCH] led: Add options for left and right led Add LED types for left and right so they can be addressed properly with ectool. BUG=b:36150361 BRANCH=none TEST=manual testing of 'ectool led ' behavior Change-Id: Iea25cc69db2d35416e787dcb5a324d2e2cf5d3a6 Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/453126 Reviewed-by: Scott Collyer --- include/ec_commands.h | 4 ++++ util/ectool.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/ec_commands.h b/include/ec_commands.h index c57e82a161..ca91290fcb 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1712,6 +1712,10 @@ enum ec_led_id { EC_LED_ID_POWER_LED, /* LED on power adapter or its plug */ EC_LED_ID_ADAPTER_LED, + /* LED to indicate left side */ + EC_LED_ID_LEFT_LED, + /* LED to indicate right side */ + EC_LED_ID_RIGHT_LED, EC_LED_ID_COUNT }; diff --git a/util/ectool.c b/util/ectool.c index 10a178c942..688c402950 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -252,7 +252,7 @@ BUILD_ASSERT(ARRAY_SIZE(led_color_names) == EC_LED_COLOR_COUNT); /* Note: depends on enum ec_led_id */ static const char * const led_names[] = { - "battery", "power", "adapter"}; + "battery", "power", "adapter", "left", "right"}; BUILD_ASSERT(ARRAY_SIZE(led_names) == EC_LED_ID_COUNT); /* Check SBS numerical value range */