summaryrefslogtreecommitdiff
path: root/common/led_common.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-04-26 22:47:36 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-02 17:45:16 -0700
commit2bb9aec01aded925b726f7b18a66cdad181ac8db (patch)
tree45f9846c6ad8839d346967fe6450964fa435b9cb /common/led_common.c
parent5bc66e29950cb57cc545f571d5111cbce1fec0da (diff)
downloadchrome-ec-2bb9aec01aded925b726f7b18a66cdad181ac8db.tar.gz
common/led_common: Add API for controlling LED state
1. Provide led_control API that can be used by different drivers to control the state of LED (0=off, 1=on, 2=reset) 2. Add a new LED ID for recovery HW_REINIT indication. BUG=b:37682514 BRANCH=None TEST=make -j buildall Change-Id: I27334bde2b879046746456a610208f3fc2dd68b4 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/487840 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common/led_common.c')
-rw-r--r--common/led_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/led_common.c b/common/led_common.c
index a894e305db..24c8dfe814 100644
--- a/common/led_common.c
+++ b/common/led_common.c
@@ -71,3 +71,12 @@ static int led_command_control(struct host_cmd_handler_args *args)
return EC_RES_SUCCESS;
}
DECLARE_HOST_COMMAND(EC_CMD_LED_CONTROL, led_command_control, EC_VER_MASK(1));
+
+__attribute__((weak))
+void led_control(enum ec_led_id led_id, enum ec_led_state state)
+{
+ /*
+ * Default weak implementation that does not affect the state of
+ * LED. Boards can provide their own implementation.
+ */
+}