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