diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-06-13 14:02:54 -0700 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2013-06-13 15:52:16 -0700 |
commit | 74f5aaaa50ae4457b1a01fd3251f575a9b4a0687 (patch) | |
tree | a95c0e4ae7feb1ac7f5fc11af726f5a25a1b4b71 | |
parent | d46ea680f7ca69dc13c91c10e83c6f61190ef159 (diff) | |
download | chrome-ec-74f5aaaa50ae4457b1a01fd3251f575a9b4a0687.tar.gz |
Use battery's precharge_current value for deep discharge recovery.
We've been providing the battery's max voltage and the charger's minimum
current to try to awaken a deep-discharged battery. For some batteries, that
doesn't appear to be enough. This change will use the battery's
preconfigured precharge_current value instead.
BUG=chrome-os-partner:20142
BRANCH=none
TEST=manual
I don't have a deep-discharged battery to try it on. I've been using these
values manually in order to get the battery away. With no battery connected,
you can run the "charger" command on the EC console to see what values it's
using. They should match what the battery wants.
Change-Id: I16d06011103ba70682397859d9844a37938d3e90
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58575
-rw-r--r-- | common/battery_falco.c | 10 | ||||
-rw-r--r-- | common/battery_link.c | 2 | ||||
-rw-r--r-- | common/charge_state.c | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/common/battery_falco.c b/common/battery_falco.c index a0bf62bf8c..8f27a9e20e 100644 --- a/common/battery_falco.c +++ b/common/battery_falco.c @@ -14,14 +14,10 @@ static const struct battery_info info = { .voltage_normal = 7400, .voltage_min = 6000, - /* - * Operational temperature range - * 0 <= T_charge <= 50 deg C - * -20 <= T_discharge <= 60 deg C - */ + /* Operational temperature range */ .temp_charge_min = CELSIUS_TO_DECI_KELVIN(0), - .temp_charge_max = CELSIUS_TO_DECI_KELVIN(50), - .temp_discharge_min = CELSIUS_TO_DECI_KELVIN(-20), + .temp_charge_max = CELSIUS_TO_DECI_KELVIN(45), + .temp_discharge_min = CELSIUS_TO_DECI_KELVIN(-10), .temp_discharge_max = CELSIUS_TO_DECI_KELVIN(60), /* Pre-charge values. */ diff --git a/common/battery_link.c b/common/battery_link.c index 97d080d876..98cde6de46 100644 --- a/common/battery_link.c +++ b/common/battery_link.c @@ -69,7 +69,7 @@ static const struct battery_info info = { .temp_discharge_max = CELSIUS_TO_DECI_KELVIN(60), /* Pre-charge current: I <= 0.01C */ - .precharge_current = (int)(DESIGN_CAPACITY * 0.01), + .precharge_current = 64, /* mA */ }; static inline void limit_value(int *val, int limit) diff --git a/common/charge_state.c b/common/charge_state.c index 1536c2b1b7..4810ebe8a7 100644 --- a/common/charge_state.c +++ b/common/charge_state.c @@ -186,7 +186,7 @@ static int state_common(struct power_state_context *ctx) * voltage for 30 seconds. */ charger_set_voltage(ctx->battery->voltage_max); - charger_set_current(ctx->charger->current_min); + charger_set_current(ctx->battery->precharge_current); for (d = 0; d < 30; d++) { sleep(1); rv = battery_temperature(&batt->temperature); |