diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-09-08 14:45:30 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-09-08 21:06:58 -0700 |
commit | b35ad52db3dcc5441b948499e06f9ad773aff0c5 (patch) | |
tree | 3b6fa0716e0107b4fbeec72dd65cd3b9ddb19392 /common | |
parent | 42bc4b8b089bf7a4872ff0879747bc4953aa4bb3 (diff) | |
download | chrome-ec-b35ad52db3dcc5441b948499e06f9ad773aff0c5.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/32652
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'common')
-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 e08e7c1bb2..3c062fbed7 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) |