diff options
Diffstat (limited to 'board/taeko/board.c')
-rw-r--r-- | board/taeko/board.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/taeko/board.c b/board/taeko/board.c index c3b496d9ce..6fb96f7d21 100644 --- a/board/taeko/board.c +++ b/board/taeko/board.c @@ -5,7 +5,9 @@ #include "battery.h" #include "button.h" +#include "charge_manager.h" #include "charge_ramp.h" +#include "charge_state_v2.h" #include "charger.h" #include "common.h" #include "compile_time_macros.h" @@ -109,3 +111,17 @@ enum battery_present battery_hw_present(void) /* The GPIO is low when the battery is physically present */ return gpio_get_level(GPIO_EC_BATT_PRES_ODL) ? BP_NO : BP_YES; } + +__override void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int charge_mv) +{ + /* + * Follow OEM request to limit the input current to + * 95% negotiated limit. + */ + charge_ma = charge_ma * 95 / 100; + + charge_set_input_current_limit(MAX(charge_ma, + CONFIG_CHARGER_INPUT_CURRENT), + charge_mv); +} |