diff options
Diffstat (limited to 'board/ezkinil/board.c')
-rw-r--r-- | board/ezkinil/board.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c index 5e15b458cc..c9e1aca267 100644 --- a/board/ezkinil/board.c +++ b/board/ezkinil/board.c @@ -865,3 +865,16 @@ int fan_percent_to_rpm(int fan, int pct) return fan_table[current_level].rpm; } + +__override void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int charge_mv) +{ + /* + * Limit the input current to 95% negotiated limit, + * to account for the charger chip margin. + */ + charge_ma = charge_ma * 95 / 100; + + charge_set_input_current_limit( + MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv); +} |