diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2014-09-03 10:42:48 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-16 20:26:05 +0000 |
commit | 1489a247c3a13f3ff6080fb696d89e1f3ed8cda8 (patch) | |
tree | 09c40c2559f238261b650e1b2885172e4192f211 | |
parent | 61f089815de40af51346a0372d0b05cef3e08242 (diff) | |
download | chrome-ec-1489a247c3a13f3ff6080fb696d89e1f3ed8cda8.tar.gz |
Revert "charger v2: set charger mode when requesting current/voltage"
This reverts commit bd4469ae4ffbbd6f2cd5549bdb8809838e55d6f7.
Setting of the charge inhibit appears to sometimes wedge the battery
such that charging cannot be un-inhibited and thus the battery cannot
charge. Since any savings introduced by inhibiting charging are
minimal, let's just leave the bit alone.
BUG=chrome-os-partner:30759
TEST=suspend_stress_test on Blaze
BRANCH=nyan
Change-Id: Ic2b9b2f84ab149b1950cc77acd56dff7fc2d383c
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/216221
Reviewed-by: Dylan Reid <dgreid@chromium.org>
-rw-r--r-- | common/charge_state_v2.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c index 4cef1072e2..c970fa74bd 100644 --- a/common/charge_state_v2.c +++ b/common/charge_state_v2.c @@ -6,7 +6,6 @@ */ #include "battery.h" -#include "battery_smart.h" #include "charge_state.h" #include "charger.h" #include "chipset.h" @@ -50,7 +49,6 @@ enum problem_type { PR_STATIC_UPDATE, PR_SET_VOLTAGE, PR_SET_CURRENT, - PR_SET_MODE, PR_POST_INIT, PR_CHG_FLAGS, PR_BATT_FLAGS, @@ -62,7 +60,6 @@ static const char * const prob_text[] = { "static update", "set voltage", "set current", - "set mode", "post init", "chg params", "batt params", @@ -281,9 +278,10 @@ static void show_charging_progress(void) */ static int charge_request(int voltage, int current) { - int r1 = EC_SUCCESS, r2 = EC_SUCCESS, r3 = EC_SUCCESS; + int r1 = EC_SUCCESS, r2 = EC_SUCCESS; static int prev_volt, prev_curr; + /* TODO(crosbug.com/p/27640): should we call charger_set_mode() too? */ if (!voltage || !current) voltage = current = 0; @@ -301,17 +299,6 @@ static int charge_request(int voltage, int current) problem(PR_SET_CURRENT, r2); /* - * Set the charge inhibit bit when possible as it appears to save - * power in some cases (e.g. Nyan with BQ24735). - */ - if (voltage > 0 || current > 0) - r3 = charger_set_mode(0); - else - r3 = charger_set_mode(CHARGE_FLAG_INHIBIT_CHARGE); - if (r3 != EC_SUCCESS) - problem(PR_SET_MODE, r3); - - /* * Only update if the request worked, so we'll keep trying on failures. */ if (!r1 && !r2) { |