diff options
Diffstat (limited to 'common/charge_manager.c')
-rw-r--r-- | common/charge_manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/charge_manager.c b/common/charge_manager.c index c12fc12318..388e74fc1c 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -431,7 +431,7 @@ static void charge_manager_fill_power_info(int port, #if defined(HAS_TASK_CHG_RAMP) || defined(CONFIG_CHARGE_RAMP_HW) /* Read ramped current if active charging port */ use_ramp_current = - (charge_port == port) && chg_ramp_allowed(sup); + (charge_port == port) && chg_ramp_allowed(port, sup); #else use_ramp_current = 0; #endif @@ -449,7 +449,7 @@ static void charge_manager_fill_power_info(int port, * available charge current. */ r->meas.current_max = chg_ramp_is_stable() ? - r->meas.current_lim : chg_ramp_max(sup, + r->meas.current_lim : chg_ramp_max(port, sup, available_charge[sup][port].current); r->max_power = @@ -728,9 +728,9 @@ static void charge_manager_refresh(void) * Allow to set the maximum current value, so the hardware can * know the range of acceptable current values for its ramping. */ - if (chg_ramp_allowed(new_supplier)) + if (chg_ramp_allowed(new_port, new_supplier)) new_charge_current_uncapped = - chg_ramp_max(new_supplier, + chg_ramp_max(new_port, new_supplier, new_charge_current_uncapped); #endif /* CONFIG_CHARGE_RAMP_HW */ /* Enforce port charge ceiling. */ @@ -756,7 +756,7 @@ static void charge_manager_refresh(void) #else #ifdef CONFIG_CHARGE_RAMP_HW /* Enable or disable charge ramp */ - charger_set_hw_ramp(chg_ramp_allowed(new_supplier)); + charger_set_hw_ramp(chg_ramp_allowed(new_port, new_supplier)); #endif board_set_charge_limit(new_port, new_supplier, new_charge_current, |