diff options
author | Edward Hill <ecgh@chromium.org> | 2018-11-20 14:57:58 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-21 01:25:11 -0800 |
commit | 0c28fa95119487b51be5aa189060333f8da0c817 (patch) | |
tree | e379dcf30c3ed7896f40bf5e46c8b7bf5ce7aaa2 /common | |
parent | b48cc28be9186d022013c9b997a13c2c93e2ec14 (diff) | |
download | chrome-ec-0c28fa95119487b51be5aa189060333f8da0c817.tar.gz |
led_pwm: Add CONFIG_LED_PWM_CHARGE_STATE_ONLY
Add an option for devices that want to show only the charging state,
but on all LEDs.
BUG=b:119746227
BRANCH=grunt
TEST=Liara LED is on when charging from either side.
Change-Id: I819eaf27d3700748e47886855765c2da6f3d9eb8
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1344795
Tested-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/led_pwm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/led_pwm.c b/common/led_pwm.c index b9d13a3d6c..87ec59a127 100644 --- a/common/led_pwm.c +++ b/common/led_pwm.c @@ -160,20 +160,20 @@ static int show_charge_state(void) pulse_leds(CONFIG_LED_PWM_CHARGE_ERROR_COLOR, 1, 2); } else { /* Discharging or not charging. */ -#ifdef CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY +#ifdef CONFIG_LED_PWM_CHARGE_STATE_ONLY /* - * If we only show the active charge port, the only reason we + * If we only show the charge state, the only reason we * would pulse the LEDs is if we had an error. If it no longer * exists, stop pulsing the LEDs. */ led_is_pulsing = 0; -#endif /* CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY */ +#endif /* CONFIG_LED_PWM_CHARGE_STATE_ONLY */ return 0; } return 1; } -#ifndef CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY +#ifndef CONFIG_LED_PWM_CHARGE_STATE_ONLY static int show_battery_state(void) { int batt_percentage = charge_get_percent(); @@ -213,7 +213,7 @@ static int show_chipset_state(void) } return 1; } -#endif /* CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY */ +#endif /* CONFIG_LED_PWM_CHARGE_STATE_ONLY */ static void update_leds(void) { @@ -221,13 +221,13 @@ static void update_leds(void) if (show_charge_state()) return; -#ifndef CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY +#ifndef CONFIG_LED_PWM_CHARGE_STATE_ONLY if (show_battery_state()) return; if (show_chipset_state()) return; -#endif /* CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY */ +#endif /* CONFIG_LED_PWM_CHARGE_STATE_ONLY */ set_led_color(-1); } |