diff options
Diffstat (limited to 'common/host_command_pd.c')
-rw-r--r-- | common/host_command_pd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c index e7dbbc2b5f..23e2710695 100644 --- a/common/host_command_pd.c +++ b/common/host_command_pd.c @@ -126,7 +126,10 @@ static void pd_check_chg_status(struct ec_response_pd_status *pd_status) #endif /* Set input current limit */ - board_set_charge_limit(pd_status->curr_lim_ma, 0); + rv = charge_set_input_current_limit( + MAX(pd_status->curr_lim_ma, CONFIG_CHARGER_INPUT_CURRENT), 0); + if (rv < 0) + CPRINTS("Failed to set input curr limit from PD MCU"); } #endif /* CONFIG_HOSTCMD_PD_CHG_CTRL */ #endif /* CONFIG_HOSTCMD_PD */ |