Files
OpenCellular/common
Alec Berg 7ad29b56ae charge_state_v2: ignore false battery SOC readings
Ignore battery readings over 100%. This fixes a samus bug
where a false battery SOC reading causes charging to
stop.

BUG=chrome-os-partner:36115, chrome-os-partner:36081
BRANCH=samus
TEST=add following code to common/smart.c:

static int reset_soc;

in battery_get_params():
if (reset_soc) {
        batt_new.state_of_charge = 65535;
        reset_soc = 0;
}

after battery_get_params():
static int command_battsoc(int argc, char **argv)
{
       reset_soc = 1;
       return EC_SUCCESS;
}
DECLARE_CONSOLE_COMMAND(battsoc, command_battsoc,
                       "",
                       "",
                       NULL);

This changes the battery state of charge to 65535% for one
loop through charge state machine. w/o this CL, on samus the
battery stops charging when you call this, but with this CL
it is fixed.

Change-Id: I44f054a4e84260bd7cd7b77e44b1698645ab6c35
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/244346
Reviewed-by: Shawn N <shawnn@chromium.org>
2015-01-31 05:42:48 +00:00
..
2014-05-21 20:32:17 +00:00
2013-12-20 05:07:58 +00:00
2014-05-21 20:32:17 +00:00
2015-01-15 01:07:02 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-03-06 21:32:57 +00:00
2013-10-25 20:12:49 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2013-12-19 00:12:28 +00:00
2014-05-21 20:32:17 +00:00
2014-03-06 21:33:09 +00:00
2014-01-14 09:19:45 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2013-12-19 00:12:28 +00:00
2014-05-17 20:14:17 +00:00
2013-12-19 00:12:28 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2015-01-28 11:13:58 +00:00