diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2019-11-12 18:25:20 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-21 17:40:15 +0000 |
commit | 7402615064ec2532e32a4902efe18196f3cb33b4 (patch) | |
tree | 3a0631efc1b83a35e5765dd21d974c72ae64ab70 | |
parent | 7ff49507b44b85c35bc3c65cd745274f37adae66 (diff) | |
download | chrome-ec-7402615064ec2532e32a4902efe18196f3cb33b4.tar.gz |
volteer: Show power information with LEDs
Configure the LEDs as power LEDs and enable setting them based on
battery and chipset state.
BUG=b:139554899
TEST=Observe LEDs; charge, disconnect battery, and fake low charge
BRANCH=none
Change-Id: Id303ffa9fce1ce1071d1615da7bb577ef4d6bfd0
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913861
Reviewed-by: Keith Short <keithshort@chromium.org>
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1929372
-rw-r--r-- | baseboard/volteer/baseboard.h | 2 | ||||
-rw-r--r-- | baseboard/volteer/led.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index f22ca023bb..07d59b999e 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -26,8 +26,6 @@ * CONFIG_LED_ONOFF_STATES_BAT_LOW when CONFIG_CHARGER is defined. */ #define CONFIG_LED_PWM -/* TODO(b/140557020): Remove this when CONFIG_CHARGER is defined. */ -#define CONFIG_LED_PWM_CHARGE_STATE_ONLY /* Although there are 2 LEDs, they are both controlled by the same lines. */ #define CONFIG_LED_PWM_COUNT 1 #define CONFIG_PWM diff --git a/baseboard/volteer/led.c b/baseboard/volteer/led.c index 7cb99d77ed..a6b533d8a7 100644 --- a/baseboard/volteer/led.c +++ b/baseboard/volteer/led.c @@ -11,7 +11,7 @@ #include "led_pwm.h" const enum ec_led_id supported_led_ids[] = { - EC_LED_ID_BATTERY_LED, + EC_LED_ID_POWER_LED, }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); @@ -49,7 +49,7 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) enum pwm_led_id pwm_id; /* Convert ec_led_id to pwm_led_id. */ - if (led_id == EC_LED_ID_BATTERY_LED) + if (led_id == EC_LED_ID_POWER_LED) pwm_id = PWM_LED0; else return EC_ERROR_UNKNOWN; |