summaryrefslogtreecommitdiff
path: root/driver/battery/bq27541.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-11-07 14:36:02 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-12-02 22:03:54 +0000
commit40a1e7fa75b9fd51cf62ee8d725a5b35d846dbd5 (patch)
tree0d403622ef503e01417e050ca6457ebf65e44643 /driver/battery/bq27541.c
parentc0ec787ba10dd3ef5fc089cf1449468ec45ff668 (diff)
downloadchrome-ec-40a1e7fa75b9fd51cf62ee8d725a5b35d846dbd5.tar.gz
Cleanly force battery to mAh mode when reading capacity
Smart batteries can report capacity in mAh or 10mW units. We forced the units to mAh in charge_state.c's main loop, but that doesn't guarantee that they're actually set before the capacity is read. It's cleaner to check the capacity reporting mode when actually reading the capacity. BUG=chrome-os-partner:20881 BRANCH=none TEST=battery command reports the same capacity data before/after change (on rambi, design=2940 mAh) Change-Id: I4a4c80eaade72bb09627d5d65693c097e264a992 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/176154
Diffstat (limited to 'driver/battery/bq27541.c')
-rw-r--r--driver/battery/bq27541.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/driver/battery/bq27541.c b/driver/battery/bq27541.c
index 72ec30b6fd..43b669476b 100644
--- a/driver/battery/bq27541.c
+++ b/driver/battery/bq27541.c
@@ -179,19 +179,6 @@ int battery_status(int *status)
return EC_ERROR_UNIMPLEMENTED;
}
-int battery_is_in_10mw_mode(int *val)
-{
- /* Always using mAh unit */
- *val = 0;
- return EC_SUCCESS;
-}
-
-int battery_set_10mw_mode(int enabled)
-{
- /* Not supported by this battery chip */
- return EC_ERROR_INVAL;
-}
-
void battery_get_params(struct batt_params *batt)
{
int v;