Hi,

On Thu, Jun 19, 2025 at 04:55:14PM +0200, Casey Connolly wrote:
> Respect the max current limit set on the battery node, one some devices
> this is set conservatively to avoid overheating since they only have a
> single charger IC (instead of two in parallel).
> 
> Signed-off-by: Casey Connolly <[email protected]>
> ---
>  drivers/power/supply/qcom_smbx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/qcom_smbx.c 
> b/drivers/power/supply/qcom_smbx.c
> index 
> fc2a8e20435639a9da4d966c43271beaeb57a03f..7fc232fa7260a7422ac12a48686cd7d396edd9a4
>  100644
> --- a/drivers/power/supply/qcom_smbx.c
> +++ b/drivers/power/supply/qcom_smbx.c
> @@ -583,9 +583,9 @@ static void smb_status_change_work(struct work_struct 
> *work)
>       case POWER_SUPPLY_USB_TYPE_CDP:
>               current_ua = CDP_CURRENT_UA;
>               break;
>       case POWER_SUPPLY_USB_TYPE_DCP:
> -             current_ua = DCP_CURRENT_UA;
> +             current_ua = chip->batt_info->constant_charge_current_max_ua;

"constant_charge_current_max_ua" is current information for the
battery. But current_ua is written to chip->base + USBIN_CURRENT_LIMIT_CFG,
which sounds like it would be current limit on the USB side?

Assuming the charger is using a buck converter to get from USB
voltage to battery voltage (very likely) the currents are
different.

Greetings,

-- Sebastian

Attachment: signature.asc
Description: PGP signature

Reply via email to