diff options
Diffstat (limited to 'board/snappy/board.c')
-rw-r--r-- | board/snappy/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/snappy/board.c b/board/snappy/board.c index 0848857f2a..d2f62edf8a 100644 --- a/board/snappy/board.c +++ b/board/snappy/board.c @@ -567,6 +567,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"); |