summaryrefslogtreecommitdiff
path: root/common/led_onoff_states.c
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-04-16 15:06:16 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-22 22:30:34 +0000
commit6ada099de9c62d6cc290be071fee4529ed86566c (patch)
tree52483243492845b3bb93e444060159a593692a67 /common/led_onoff_states.c
parent4746791009b75da679d44d45e8487c57c9191329 (diff)
downloadchrome-ec-6ada099de9c62d6cc290be071fee4529ed86566c.tar.gz
LED On/Off: Make battery LED optional
Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/led_onoff_states.c')
-rw-r--r--common/led_onoff_states.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/led_onoff_states.c b/common/led_onoff_states.c
index ef4ddbd2b5..1731953d8c 100644
--- a/common/led_onoff_states.c
+++ b/common/led_onoff_states.c
@@ -17,6 +17,18 @@
#define CPRINTS(format, args...) cprints(CC_GPIO, format, ## args)
+/*
+ * In order to support the battery LED being optional (ex. for Chromeboxes),
+ * set up default battery table, setter, and variables.
+ */
+__overridable struct led_descriptor
+ led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES];
+__overridable const int led_charge_lvl_1;
+__overridable const int led_charge_lvl_2;
+__overridable void led_set_color_battery(enum ec_led_colors color)
+{
+}
+
static enum led_states led_get_state(void)
{
int charge_lvl;