summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-27 17:09:05 +0800
committerChromeBot <chrome-bot@google.com>2013-06-02 14:12:12 -0700
commit9e98cfbb82c79e889bdc5ce9cdc6301ef008c26b (patch)
tree784c219a37bff6a0a64f1fe1fd29ace819f93452
parente3dc0dc83702d7b7aa44bf95d07b2b7b95818b20 (diff)
downloadchrome-ec-9e98cfbb82c79e889bdc5ce9cdc6301ef008c26b.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 Original-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> (cherry picked from commit 3501ccffdb28306ec77003c96df3b898fd7a9545) Change-Id: I66ed4d1f964fead972e33c6f7e05422b6323a1e0 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56907 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/spring/board.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/spring/board.c b/board/spring/board.c
index b6e4ccd415..f9c8fd8312 100644
--- a/board/spring/board.c
+++ b/board/spring/board.c
@@ -497,7 +497,8 @@ static void board_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;