summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-27 17:09:05 +0800
committerChromeBot <chrome-bot@google.com>2013-05-28 12:53:52 -0700
commit3501ccffdb28306ec77003c96df3b898fd7a9545 (patch)
tree06140214a588de281d843c52a5df7b83674d77cd
parent87d8f8e5b1ced8647640eef710088d453d0f0e33 (diff)
downloadchrome-ec-3501ccffdb28306ec77003c96df3b898fd7a9545.tar.gz
spring: Prevent showing green LED when we are actually charging
When we use about the same amount of power as what the charger provides, we sometimes show green LED. We should avoid this when the battery is not full. BUG=chrome-os-partner:19746 TEST=Manual BRANCH=spring Change-Id: Id31762aefe22535de64f63a023c35995a3725ef8 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56724 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/lp5562_battery_led.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/lp5562_battery_led.c b/common/lp5562_battery_led.c
index 165bbc9eca..24da647b5e 100644
--- a/common/lp5562_battery_led.c
+++ b/common/lp5562_battery_led.c
@@ -260,7 +260,8 @@ static void battery_led_update(void)
break;
}
- if (current && desired_current)
+ /* If battery doesn't want any current, it's considered full. */
+ if (desired_current)
state = LED_STATE_SOLID_YELLOW;
else
state = LED_STATE_SOLID_GREEN;