diff options
author | Rong Chang <rongchang@chromium.org> | 2013-09-28 18:44:30 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-02 09:19:42 +0000 |
commit | 24986704af5b35f604d4461a1b947f1210863605 (patch) | |
tree | cd9478bf23de979f733bebe526b8974ccc19608f | |
parent | 0f1f1229b9062376e706509d5a04d237253fbb47 (diff) | |
download | chrome-ec-24986704af5b35f604d4461a1b947f1210863605.tar.gz |
Always enable tpschrome low current charging
The PMU charger loop is conservative. And there is no need to set
hardware low charging current termination.
BRANCH=pit
BUG=chrome-os-partner:22946
TEST=manual
Discharge the battery to level < 40%.
Issue console command 'pmu', check register 0x09 output.
The NOITERM bit(5) should be set to 1. That means no low charging
current termination.
Signed-off-by: Rong Chang <rongchang@chromium.org>
Change-Id: I45532dcaab3bab566407b209f26693e2c3451014
Reviewed-on: https://chromium-review.googlesource.com/170906
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Jaehoon Kim <jh228.kim@samsung.com>
Tested-by: Jaehoon Kim <jh228.kim@samsung.com>
-rw-r--r-- | common/pmu_tps65090_charger.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c index bbcf0994b1..9611a95a20 100644 --- a/common/pmu_tps65090_charger.c +++ b/common/pmu_tps65090_charger.c @@ -156,20 +156,6 @@ static int rsoc_moving_average(int state_of_charge) return moving_average; } - -static int config_low_current_charging(int charge) -{ - /* Disable low current termination */ - if (charge < 40) - return pmu_low_current_charging(1); - - /* Enable low current termination */ - if (charge > 60) - return pmu_low_current_charging(0); - - return EC_SUCCESS; -} - static int calc_next_state(int state) { int batt_temp, alarm, capacity, charge; @@ -190,11 +176,8 @@ static int calc_next_state(int state) return ST_BAD_COND; /* Enable charging when battery doesn't respond */ - if (battery_temperature(&batt_temp)) { - if (config_low_current_charging(0)) - return ST_BAD_COND; + if (battery_temperature(&batt_temp)) return ST_PRE_CHARGING; - } /* Turn off charger when battery temperature is out * of the start charging range. @@ -212,7 +195,6 @@ static int calc_next_state(int state) /* Start charging only when battery charge lower than 100% */ if (!battery_state_of_charge(&charge)) { - config_low_current_charging(charge); if (charge < 100) return ST_CHARGING; } @@ -230,7 +212,6 @@ static int calc_next_state(int state) if (!battery_start_charging_range(batt_temp)) return ST_IDLE0; if (!battery_state_of_charge(&charge)) { - config_low_current_charging(charge); if (charge >= 100) return ST_IDLE0; } @@ -393,6 +374,9 @@ void charger_task(void) pmu_init(); + /* Enable low current charging */ + pmu_low_current_charging(1); + /* Enable charger interrupt */ gpio_enable_interrupt(GPIO_CHARGER_INT_L); |