diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-12-06 19:06:56 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-12-13 21:21:58 -0800 |
commit | d3e662bf77234755c0483643dac5a6a74beda3ea (patch) | |
tree | 497c1d9d4918dde98d023f9a3964a18cc43c1590 /board/reef/board.c | |
parent | 80d5601f391974090a07825307ade475f9bb1a64 (diff) | |
download | chrome-ec-d3e662bf77234755c0483643dac5a6a74beda3ea.tar.gz |
reef: Discharge on AC till charger is detected
To avoid inrush current from the external charger, enable discharge
on AC till the new charger is detected and charge detect delay has
passed.
BUG=chrome-os-partner:60547
BRANCH=none
TEST=Multiple Ramp Resets and inrush current is not observed.
Change-Id: Ie3317fa6e6c2e8f00d4ce7cb9c6bee81c50d7bb2
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/417168
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/reef/board.c')
-rw-r--r-- | board/reef/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/reef/board.c b/board/reef/board.c index 9e4a69d21d..e7d433a89f 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -568,6 +568,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 the 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"); |