snow: make pmu charge ranges inclusive

Since we work with integral values for battery temperature, lower
limits need to be inclusive when determining when to enable/disable
charging.

Signed-off-by: David Hendricks <dhendrix@chromium.org>
BRANCH=snow
BUG=none
TEST=none (yet...)

Change-Id: Icfc52066ca469b56ebc411bad864111848eab197
Reviewed-on: https://gerrit.chromium.org/gerrit/32652
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
David Hendricks
2012-09-08 14:45:30 -07:00
committed by Gerrit
parent 42bc4b8b08
commit b35ad52db3

View File

@@ -76,13 +76,13 @@ static int battery_temperature_celsius(int t)
static int battery_start_charging_range(int t)
{
t = battery_temperature_celsius(t);
return (t > 5 && t < 45);
return (t >= 5 && t < 45);
}
static int battery_charging_range(int t)
{
t = battery_temperature_celsius(t);
return (t > 5 && t < 60);
return (t >= 5 && t < 60);
}
static int battery_discharging_range(int t)