mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Sebastian Reichel <sre@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] power: supply: qcom_battmgr: Add multi-port USB-C power supply support
Date: Thu, 3 Sep 2026 09:44:27 +0200	[thread overview]
Message-ID: <e4338457-dd40-40c0-b250-b13246e8215f@oss.qualcomm.com> (raw)
In-Reply-To: <20260806-b4-battmgr-multiport-usb-v2-1-1a6dd1e06cc2@oss.qualcomm.com>

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.
> 
> At firmware-enable time, query USB_NUM_PORTS over the existing
> BATTMGR_USB_PROPERTY_GET opcode to discover how many ports the
> firmware actually reports, and register the additional
> "qcom-battmgr-usb2"/"qcom-battmgr-usb3" power supplies only when the
> firmware confirms a second/third port. Each additional port is polled
> independently via new BATTMGR_USB2_PROPERTY_GET/SET (0xC0/0xC1) and
> BATTMGR_USB3_PROPERTY_GET/SET (0xC2/0xC3) opcodes so its properties
> are not aliased to the primary port's state.
> 
> X1E80100 ports report their USB-C adapter type on USB_ADAP_TYPE
> rather than the SM8350/SC8280XP USB_TYPE property, so add a dedicated
> x1e80100_usb_prop_map[] mapping POWER_SUPPLY_PROP_USB_TYPE to
> USB_ADAP_TYPE, and use it for all three X1E80100 USB ports.
> 
> Give the primary X1E80100 USB port its own update/get_property
> callback (qcom_battmgr_usb_x1e80100_update()/
> qcom_battmgr_usb_x1e80100_get_property()) instead of routing it
> through the SC8280XP battery-status update path, mirroring the
> pattern already used for the usb2/usb3 ports.
> 
> Also add the POWER_SUPPLY_PROP_CAPACITY entry to x1e80100_bat_props[].

This should be a (easily backportable) separate bugfix

Konrad

      parent reply	other threads:[~2026-09-03  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 15:06 Kamal Wadhwa
2026-09-03  7:13 ` Konrad Dybcio
2026-09-03  7:15 ` Konrad Dybcio
2026-09-03  7:44 ` Konrad Dybcio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4338457-dd40-40c0-b250-b13246e8215f@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®