glados: increase voltage hysteresis in fast charging

Increase voltage hysteresis in fast charging to 100mV to avoid
bouncing back and forth between low and high voltage profiles.

BUG=chrome-os-partner:44299
BRANCH=none
TEST=test on glados, charge up from below 8.2V to above 8.3V
with zinger and verify that we switch cleanly from the low
voltage profile to the high voltage profile.

Change-Id: Ia4c03b93da66c4913848ba8eec0e09988c4d71d8
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/296024
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Alec Berg
2015-08-28 14:50:44 -07:00
committed by chrome-bot
parent 5943f49e17
commit 252dce9bd3

View File

@@ -116,13 +116,13 @@ int charger_profile_override(struct charge_state_data *curr)
/*
* If battery voltage reading is bad, use the last reading. Otherwise,
* determine voltage range with 20mV * hysteresis.
* determine voltage range with hysteresis.
*/
if (curr->batt.flags & BATT_FLAG_BAD_VOLTAGE) {
batt_voltage = prev_batt_voltage;
} else {
batt_voltage = prev_batt_voltage = curr->batt.voltage;
if (batt_voltage < 8280)
if (batt_voltage < 8200)
voltage_range = VOLTAGE_RANGE_LOW;
else if (batt_voltage > 8300)
voltage_range = VOLTAGE_RANGE_HIGH;