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 <rongchang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
This commit is contained in:
Vic Yang
2012-06-29 11:27:13 +08:00
committed by Gerrit
parent a1cde77c51
commit 67c9f4547e

View File

@@ -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