diff options
Diffstat (limited to 'board/storo/board.c')
-rw-r--r-- | board/storo/board.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/storo/board.c b/board/storo/board.c index 83d9ef4c72..f6f3ed5750 100644 --- a/board/storo/board.c +++ b/board/storo/board.c @@ -431,6 +431,19 @@ uint16_t tcpc_get_alert_status(void) return status; } +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); + + /* + * b/147463641: The charger IC seems to overdraw ~4%, therefore we + * reduce our target accordingly. + */ + icl = icl * 96 / 100; + charge_set_input_current_limit(icl, charge_mv); +} + int board_is_sourcing_vbus(int port) { int regval; |