diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-01-22 17:12:31 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-23 02:03:27 -0800 |
commit | 66828807afb81d6687fac6319a2d8340e82cef3d (patch) | |
tree | 76fc31b249ba79c32b144e502cda069952947dab /board/eve | |
parent | 5307725091ccb54cb5e849fedbfc26388f13023f (diff) | |
download | chrome-ec-66828807afb81d6687fac6319a2d8340e82cef3d.tar.gz |
eve: Discharge on AC until charger is detected
To avoid inrush current from the external charger, enable
discharge on AC until the new charger is detected and
charge detect delay has passed.
BUG=chrome-os-partner:60547
BRANCH=none
TEST=multiple ramp resets
Change-Id: I9dbb028bc149589ac586e8ff1f5d4cc11ad4bb3f
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/431138
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/eve')
-rw-r--r-- | board/eve/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/eve/board.c b/board/eve/board.c index 9a6f713486..3e0470c7ed 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -448,6 +448,14 @@ int board_set_active_charge_port(int charge_port) case CHARGE_PORT_NONE: bd9995x_port_select = 0; bd9995x_port = BD9995X_CHARGE_PORT_BOTH; + + /* + * To avoid inrush current from external charger, enable + * discharge on AC till the new charger is detected and + * charge detect delay has passed. + */ + if (charge_get_percent() > 2) + charger_discharge_on_ac(1); break; default: panic("Invalid charge port\n"); |