summaryrefslogtreecommitdiff
path: root/board/kukui/led.c
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2018-05-03 10:13:59 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-06-30 17:21:31 -0700
commitdc5ef9e359c7491ee9d476d8c4b0aef4e4142ae6 (patch)
treed2a3f132179aa976171826891515170ca14a16f9 /board/kukui/led.c
parentb57a18629cbed1d72719a8a5b5047803edb46d0e (diff)
downloadchrome-ec-dc5ef9e359c7491ee9d476d8c4b0aef4e4142ae6.tar.gz
kukui: Initial setup for ec.
Setup initial files and GPIOs for kukui. TEST=make BOARD=kukui -j BUG=b:80159522 b:110243480 BRANCH=none Change-Id: I5c5f1f08d0a0c8e1336a27019ea01b2e0850d3c1 Signed-off-by: Yilun Lin <yllin@google.com> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1041505 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board/kukui/led.c')
-rw-r--r--board/kukui/led.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/kukui/led.c b/board/kukui/led.c
new file mode 100644
index 0000000000..68e7570303
--- /dev/null
+++ b/board/kukui/led.c
@@ -0,0 +1,33 @@
+/* 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.
+ *
+ * Battery LED control for Kukui board.
+ *TODO(b:80160408): Implement mt6370 led driver.
+ */
+
+#include "hooks.h"
+#include "led_common.h"
+
+/* LEDs on Kukui are active low. */
+#define BAT_LED_ON 0
+#define BAT_LED_OFF 1
+
+const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED };
+
+const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);
+
+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)
+{
+ return EC_SUCCESS;
+}
+
+/* Called by hook task every 1 sec */
+static void led_second(void)
+{
+}
+DECLARE_HOOK(HOOK_SECOND, led_second, HOOK_PRIO_DEFAULT);