mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] power: supply: qcom_battmgr: Apply the USB host current limit early
@ 2026-11-22 19:20 Venkat Yadlapati via B4 Relay
  2026-11-22 19:20 ` [PATCH v2 1/2] power: supply: qcom_battmgr: Apply a USB input current limit set early Venkat Yadlapati via B4 Relay
  2026-11-22 19:20 ` [PATCH v2 2/2] power: supply: qcom_battmgr: Don't limit the input current of chargers Venkat Yadlapati via B4 Relay
  0 siblings, 2 replies; 3+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-22 19:20 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: linux-arm-msm, linux-pm, linux-kernel, Joonhoe Kim, phone-devel,
	Venkat Yadlapati

On the Motorola Signature the battery manager firmware keeps the input
current limit of a USB host port at the 100 mA allowed before
enumeration, so the phone discharges while it is connected to a
computer. The dwc3 controller reports the current the host grants
through usb-psy-name, and commit be5e7367bceb made the limit writable.

The controller reports it before the battery manager service is up
though, so the first patch keeps the limit and applies it once the
service comes up. The second one applies it only to SDP, CDP and USB PD
ports, like the downstream driver, so a dedicated charger is never
throttled to what the controller reports.

Tested on a Motorola Signature: connected to a computer it charges after
enumeration instead of discharging.

I used an LLM (Claude) to help write these patches and their commit
messages. I reviewed all of them and tested the result on the device.

---
Changes in v2:
- Drop the Assisted-by trailers and the LLM notes from the commit
  messages, the LLM use is stated in this cover letter.
- Link to v1: https://patch.msgid.link/20261116-vantage-battmgr-v1-0-7b59157377b7@yahoo.com

---
Venkat Yadlapati (2):
      power: supply: qcom_battmgr: Apply a USB input current limit set early
      power: supply: qcom_battmgr: Don't limit the input current of chargers

 drivers/power/supply/qcom_battmgr.c | 61 ++++++++++++++++++++++++++++++++-----
 1 file changed, 53 insertions(+), 8 deletions(-)
---
base-commit: 7071d4750856abbc68dfe431acc58a1d45dd42e8
change-id: 20261116-vantage-battmgr-945e626783c4

Best regards,
--  
Venkat Yadlapati <venkat.yadlapati@yahoo.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-22 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22 19:20 [PATCH v2 0/2] power: supply: qcom_battmgr: Apply the USB host current limit early Venkat Yadlapati via B4 Relay
2026-11-22 19:20 ` [PATCH v2 1/2] power: supply: qcom_battmgr: Apply a USB input current limit set early Venkat Yadlapati via B4 Relay
2026-11-22 19:20 ` [PATCH v2 2/2] power: supply: qcom_battmgr: Don't limit the input current of chargers Venkat Yadlapati via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®