summaryrefslogtreecommitdiff
path: root/include/charge_state.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-07-12 16:33:10 +0800
committerGerrit <chrome-bot@google.com>2012-07-18 09:31:27 -0700
commitf322e1b96a5a7400d283b2a6397e020e6200522c (patch)
tree82c4f47bf2af9fb654a502c037b051e9007dfdbf /include/charge_state.h
parent9c289eda9f4fc9d14ea334cf57bc94f789c890e9 (diff)
downloadchrome-ec-f322e1b96a5a7400d283b2a6397e020e6200522c.tar.gz
Set power LED to green when we are trickle charging nearly full
When battery is nearly full, battery sometimes demands for very low current and we are actually trickle charging. This causes the last part of charging process very long, but the actual charged amount is only few mAh. Let's set power LED to green in this case so that user doesn't feel the device is charging forever. BUG=chrome-os-partner:11248 TEST=Charge the battery to nearly full. Disconnect and connect AC power. Check the power LED is green when we are trickle charging. Change-Id: Ide108778232e9f1d3abe6b61af7518af25040d10 Reviewed-on: https://gerrit.chromium.org/gerrit/27264 Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r--include/charge_state.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h
index c9129c03a5..dc05ba188e 100644
--- a/include/charge_state.h
+++ b/include/charge_state.h
@@ -4,6 +4,7 @@
*
*/
+#include "power_led.h"
#include "timer.h"
#ifndef __CROS_EC_CHARGE_STATE_H
@@ -80,6 +81,7 @@ struct power_state_data {
enum power_state state;
uint32_t error;
timestamp_t ts;
+ enum powerled_color led_color;
};
/* State context