summaryrefslogtreecommitdiff
path: root/board/willow
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 /board/willow
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 'board/willow')
-rw-r--r--board/willow/led.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/board/willow/led.c b/board/willow/led.c
index e5b204f934..c579cb6165 100644
--- a/board/willow/led.c
+++ b/board/willow/led.c
@@ -12,9 +12,10 @@
#include "led_onoff_states.h"
#define LED_ON_LVL 0
#define LED_OFF_LVL 1
-const int led_charge_lvl_1 = 5;
-const int led_charge_lvl_2 = 95;
-struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
+__override const int led_charge_lvl_1 = 5;
+__override const int led_charge_lvl_2 = 95;
+__override struct led_descriptor
+ led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
[STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
[STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
[STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
@@ -31,7 +32,7 @@ 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_set_color_battery(enum ec_led_colors color)
+__override void led_set_color_battery(enum ec_led_colors color)
{
switch (color) {
case EC_LED_COLOR_AMBER:
@@ -77,4 +78,4 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
led_set_color_battery(LED_OFF);
}
return EC_SUCCESS;
-} \ No newline at end of file
+}