Re: [PATCH v2] power: supply: qcom_battmgr: Add multi-port USB-C power supply support

From: Konrad Dybcio

Date: Thu Sep 03 2026 - 03:23:44 EST


On 8/6/26 5:06 PM, Kamal Wadhwa wrote:
> Extend the qcom_battmgr driver to report up to MAX_USB_PORTS (3)
> USB-C power supply ports on the X1E80100 & Glymur platform, which
> exposes more than one charger port to firmware.

[...]

> struct qcom_battmgr_wireless {
> @@ -316,6 +330,8 @@ struct qcom_battmgr {
> struct power_supply *ac_psy;
> struct power_supply *bat_psy;
> struct power_supply *usb_psy;
> + struct power_supply *usb2_psy;
> + struct power_supply *usb3_psy;

I think turning this into an array could make things more obvious

The defines also mention USB/USB2/USB3, so I think we should either
rename USB to USB1 or re-index them to the more natural 0/1/2
(or perhaps primary/secondary/tertiary)?

Konrad