From 252dce9bd3d70b09e33aba17580ad11d1203ee73 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Fri, 28 Aug 2015 14:50:44 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/296024 Reviewed-by: Shawn N --- board/glados/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/glados/battery.c b/board/glados/battery.c index 307f977c67..4c819dac48 100644 --- a/board/glados/battery.c +++ b/board/glados/battery.c @@ -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;