From 67c9f4547e7152ee020e33869e272ff39e4314ee Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Fri, 29 Jun 2012 11:27:13 +0800 Subject: [PATCH] Fix a bug in battery temperature cut off When battery temperature is too low, charging should be paused. BUG=none TEST=none Change-Id: I0de87143f5da810cee70c14ee3c52614b5cf3d3b Reviewed-on: https://gerrit.chromium.org/gerrit/26380 Reviewed-by: Rong Chang Tested-by: Vic Yang Commit-Ready: Vic Yang --- common/battery_atl706486.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/battery_atl706486.c b/common/battery_atl706486.c index c4b3eb4965..29ef5b6c91 100644 --- a/common/battery_atl706486.c +++ b/common/battery_atl706486.c @@ -34,7 +34,7 @@ static const struct battery_info info = { * * The temperature values below should be deci-Kelvin */ - .temp_charge_min = 0, + .temp_charge_min = 0 * 10 + 2731, .temp_charge_max = 45 * 10 + 2731, .temp_discharge_min = -20 * 10 + 2731, .temp_discharge_max = 60 * 10 + 2731, @@ -89,6 +89,7 @@ void battery_vendor_params(struct batt_params *batt) batt->temperature <= info.temp_charge_min) { batt->desired_voltage = 0; batt->desired_current = 0; + return; } /* Vendor provided charging method