summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRong Chang <rongchang@chromium.org>2012-05-28 18:07:07 +0800
committerRong Chang <rongchang@chromium.org>2012-05-28 18:07:07 +0800
commitf2678998617771edbfb3574b66c4573d75e6dda7 (patch)
tree7f9e046990fa17b9f76753c81ea48ca90221b3ec
parentb85a7ce9d686799e88bf65fa95ed49c6d561d621 (diff)
downloadchrome-ec-f2678998617771edbfb3574b66c4573d75e6dda7.tar.gz
Fix temperature comparison issue in discharging state
When discharging, EC checks if battery temperature is in working range. The battery pack module should provide the working range in deci-Kelvin, not Celcius. Signed-off-by: Rong Chang <rongchang@chromium.org> BUG=chrome-os-partner:9485 TEST=manual Unplug AC adapter, and check /sys/class/power_supply/BAT0/charge_now Change-Id: Ib6a312941cb1f3622c6f18d2c58bc50a06feafaf
-rw-r--r--common/battery_atl706486.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/common/battery_atl706486.c b/common/battery_atl706486.c
index a953772d1b..92874a36f5 100644
--- a/common/battery_atl706486.c
+++ b/common/battery_atl706486.c
@@ -29,13 +29,15 @@ static const struct battery_info info = {
.voltage_min = 6000,
/* Operation temperation range
- * 0 <= T_charge <= 45
- * -20 <= T_discharge <= 60
+ * 0 <= T_charge <= 45 deg C
+ * -20 <= T_discharge <= 60 deg C
+ *
+ * The temperature values below should be deci-Kelvin
*/
- .temp_charge_min = 0,
- .temp_charge_max = 45,
- .temp_discharge_min = -20,
- .temp_discharge_max = 60,
+ .temp_charge_min = 0,
+ .temp_charge_max = 45 * 10 + 2731,
+ .temp_discharge_min = -20 * 10 + 2731,
+ .temp_discharge_max = 60 * 10 + 2731,
/* Maximum discharging current
* TODO(rong): Check if we need this in power manager