lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6vcr6kvd5ryh3fj4j27hkl7742f4ooy4sns77pcudgox3glqyc@dz4on64p4tif>
Date: Sun, 22 Jun 2025 20:28:22 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Casey Connolly <casey.connolly@...aro.org>
Cc: Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>, 
	Kees Cook <kees@...nel.org>, "Gustavo A. R. Silva" <gustavoars@...nel.org>, 
	linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 06/11] power: supply: qcom_smbx: respect battery
 charge-term-current-microamp

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 <casey.connolly@...aro.org>
> ---
>  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

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ