diff options
author | Furquan Shaikh <furquan@google.com> | 2018-03-23 19:38:25 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-24 20:53:31 -0700 |
commit | 286dfbd0c9bb71100cccde2c55f602b96cf1d211 (patch) | |
tree | 7d784f7e04c606f1edfbc689102aebd30abdf074 /board/yorp/led.c | |
parent | 3bd4e0de5edc6f62eda8739d31816b5b29d1979b (diff) | |
download | chrome-ec-286dfbd0c9bb71100cccde2c55f602b96cf1d211.tar.gz |
yorp: Switch on blue LED on boot-up
This is helpful during early debugging to identify if the EC is up and
running. This will be later cleaned up as part of LED support for
yorp.
BUG=b:74952719
BRANCH=None
TEST=Verified that blue led glows up on booting up EC.
Change-Id: I4670c210045c649a926e7c3f23c5d6097df69e3d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/979270
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'board/yorp/led.c')
-rw-r--r-- | board/yorp/led.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/board/yorp/led.c b/board/yorp/led.c new file mode 100644 index 0000000000..164a5c600b --- /dev/null +++ b/board/yorp/led.c @@ -0,0 +1,22 @@ +/* Copyright 2018 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * Power and battery LED control for Yorp + */ + +#include "gpio.h" +#include "hooks.h" + +static void led_init(void) +{ + /* + * Temporary hack to turn on blue led to indicate that EC is up and + * running. This can be removed after adding proper LED support + * (b/74952719). + */ + gpio_set_level(GPIO_BAT_LED_BLUE_L, 0); + gpio_set_level(GPIO_BAT_LED_ORANGE_L, 1); +} + +DECLARE_HOOK(HOOK_INIT, led_init, HOOK_PRIO_DEFAULT); |