diff options
Diffstat (limited to 'board/haboki/board.c')
-rw-r--r-- | board/haboki/board.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/board/haboki/board.c b/board/haboki/board.c index 8814871ed7..d7509115b5 100644 --- a/board/haboki/board.c +++ b/board/haboki/board.c @@ -526,17 +526,19 @@ uint16_t tcpc_get_alert_status(void) return status; } -__override void board_set_charge_limit(int port, int supplier, int charge_ma, - int max_ma, int charge_mv) +void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, + int charge_mv) { + int icl = MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT); + /* Limit C1 on board version 0 to 2.0 A */ if ((board_version == 0) && (port == 1)) - charge_ma = MIN(charge_ma, 2000); + icl = MIN(icl, 2000); /* * TODO(b/151955431): Characterize the input current limit in case a * scaling needs to be applied here */ - charge_set_input_current_limit(charge_ma, charge_mv); + charge_set_input_current_limit(icl, charge_mv); } int board_set_active_charge_port(int port) |