diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-03-13 09:47:25 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-13 19:58:51 -0700 |
commit | 35387474a1a03209aee02463ad53e300b4d1d938 (patch) | |
tree | c3051f32d196d11740fc1110202f90b26660c6b7 | |
parent | 584cd06c9cd7f3caeba348dc6f62b67738544ca4 (diff) | |
download | chrome-ec-35387474a1a03209aee02463ad53e300b4d1d938.tar.gz |
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 <left|right> <color>' behavior
Change-Id: Iea25cc69db2d35416e787dcb5a324d2e2cf5d3a6
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/453126
Reviewed-by: Scott Collyer <scollyer@chromium.org>
-rw-r--r-- | include/ec_commands.h | 4 | ||||
-rw-r--r-- | util/ectool.c | 2 |
2 files changed, 5 insertions, 1 deletions
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 */ |