diff options
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"); |