diff --git a/driver/charger/bq25703.c b/driver/charger/bq25703.c index 0054168a59..55e90ee7e3 100644 --- a/driver/charger/bq25703.c +++ b/driver/charger/bq25703.c @@ -228,7 +228,13 @@ int charger_get_input_current(int *input_current) { int rv, reg; - rv = raw_read8(BQ25703_REG_IIN_HOST, ®); + /* + * IIN_DPM register reflects the actual input current limit programmed + * in the register, either from host or from ICO. After ICO, the + * current limit used by DPM regulation may differ from the IIN_HOST + * register settings. + */ + rv = raw_read8(BQ25703_REG_IIN_DPM, ®); if (!rv) *input_current = REG_TO_INPUT_CURRENT(reg); diff --git a/include/charger.h b/include/charger.h index fcdbc3034e..964c3bf759 100644 --- a/include/charger.h +++ b/include/charger.h @@ -138,8 +138,17 @@ int board_discharge_on_ac(int enable); int charger_get_system_power(void); /* Other parameters that may be charger-specific, but are common so far. */ + +/* Set desired input current value */ int charger_set_input_current(int input_current); + +/* + * Get actual input current value. + * Actual input current may be less than the desired input current set + * due to current ratings of the wall adapter. + */ int charger_get_input_current(int *input_current); + int charger_manufacturer_id(int *id); int charger_device_id(int *id); int charger_get_option(int *option);