From 06fbe70e50e99ef3d15d749049318049a0dbd48e Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Tue, 7 Mar 2017 09:41:02 -0800 Subject: [PATCH] eve: Reduce max battery charge voltage for 0.5% margin Limit battery charge voltage to prevent battery over-charge due to regulation inaccuracy. (ported from reef board) BUG=b:36024657 BRANCH=none TEST=build and boot on reef and ensure charging is still functional Change-Id: I90dd8bda3d67a6c50aa39bbd096239565c73b7c5 Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/450950 Reviewed-by: Scott Collyer --- board/eve/battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/eve/battery.c b/board/eve/battery.c index fad21c2249..e20d35dd85 100644 --- a/board/eve/battery.c +++ b/board/eve/battery.c @@ -47,7 +47,7 @@ static enum battery_type board_battery_type = BATTERY_TYPE_COUNT; * limits are given by discharging_min/max_c. */ static const struct battery_info batt_info_lg = { - .voltage_max = 8800, /* mV */ + .voltage_max = TARGET_WITH_MARGIN(8800, 5), /* mV */ .voltage_normal = 7700, .voltage_min = 6100, /* Add 100mV for charger accuracy */ .precharge_current = 256, /* mA */ @@ -65,7 +65,7 @@ static const struct battery_info batt_info_lg = { * limits are given by discharging_min/max_c. */ static const struct battery_info batt_info_lishen = { - .voltage_max = 8750, /* mV */ + .voltage_max = TARGET_WITH_MARGIN(8750, 5), /* mV */ .voltage_normal = 7700, .voltage_min = 6100, /* Add 100mV for charger accuracy */ .precharge_current = 88, /* mA */