diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-09-08 14:45:30 -0700 |
---|---|---|
committer | David Hendricks <dhendrix@chromium.org> | 2012-09-08 15:40:54 -0700 |
commit | 9b534f13432c4450a90e6b98a8af99d4ec6968d7 (patch) | |
tree | eade682bbffbdf5226cdf697f88ac85466e8e546 | |
parent | d7c14aaea26740e50fe3f67a307db9fa54cb0a99 (diff) | |
download | chrome-ec-9b534f13432c4450a90e6b98a8af99d4ec6968d7.tar.gz |
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/32656
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | common/pmu_tps65090_charger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c index 1eab992ec8..b1df59bcab 100644 --- a/common/pmu_tps65090_charger.c +++ b/common/pmu_tps65090_charger.c @@ -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) |