diff options
-rw-r--r-- | board/casta/board.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/casta/board.c b/board/casta/board.c index 71ab12891e..6927dfef4d 100644 --- a/board/casta/board.c +++ b/board/casta/board.c @@ -155,6 +155,19 @@ static void board_init(void) } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_INIT_I2C + 2); +static void set_input_limit_on_ac_removal(void) +{ + if(extpower_is_present()) + return; + + if(get_cbi_ssfc_charger() != SSFC_CHARGER_BQ25710) + return; + + charger_set_input_current(CONFIG_CHARGER_INPUT_CURRENT); + +} +DECLARE_HOOK(HOOK_AC_CHANGE, set_input_limit_on_ac_removal, HOOK_PRIO_DEFAULT); + void board_overcurrent_event(int port, int is_overcurrented) { /* Sanity check the port. */ |