Re: [PATCH v2 0/2] power: supply: qcom_battmgr: Apply the USB host current limit early

From: Qianhui Xu

Date: Wed Nov 25 2026 - 03:14:32 EST


Hello Venkat,

Tested both patches on a second device, an SM8750 tablet (Lenovo Legion
Y700 Gen 4), kernel v7.4-rc3 plus be5e7367bceb ("Allow setting the USB
input current limit") plus your 1/2 and 2/2. The kernel was started over
fastboot boot on the tablet itself; the probe script only reads power
supply attributes and writes input_current_limit.

The mechanism works here:

- write 900000 -> input_current_limit reads back 900000, rc = 0
- write 500000 -> reads back 500000, rc = 0
- no "unknown message" from qcom_battmgr in dmesg after the writes
- usb_type on this port reports SDP, so the filter in 2/2 lets the write
through; without the filter the behaviour was the same
- the firmware default here is 100 mA, not the 500 mA you saw on the
Motorola, so 1/2's replay is the interesting part for devices like this
one. I did not get a sample of that path itself (the limits above were
written after the service was up).

One observation, offered as data, not as a request: on the PC port used
here the battery-side current_now did not follow the requested limit in
the expected direction (500 mA -> about +1.14 A, 900 mA -> about +0.77 A,
two rounds each, same boot). That number is not trustworthy on this board
as a power measure - +1.14 A cannot come from a 500 mA port - so I am not
claiming the limit is ineffective, only that current_now is not a usable
oracle for it here. If you have a way to observe the effect on the
Motorola that is less indirect, it would be worth putting in the cover.

Feel free to carry:

Tested-by: Qianhui Xu <xiaqinghuan@xxxxxxxxxxxxxxxx> # on 1/2 and 2/2

Tested against: be5e7367bceb (power-supply for-next) + this series, on
SM8750 / Lenovo Legion Y700 Gen 4, USB2 SDP port of a PC.

Disclosure: this test report was prepared with the help of an LLM coding
assistant; every command and every number above was run and read by the
author on the device.

Best regards,
Qianhui Xu