Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Venkat Yadlapati" <venkat.yadlapati@yahoo.com>
Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name
Date: Sun, 15 Nov 2026 20:30:07 +0000	[thread overview]
Message-ID: <sashiko-outbox-215815@kernel.org> (raw)
In-Reply-To: <20261116-vantage-dwc3-v1-1-6abb5a3277f0@yahoo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: usb: snps,dwc3-common: usb-psy-name exposes
  Linux psy name
--

commit 4bb8a88bbaa8fbc9c3b1e6963f4478fd21569377
Author: Venkat Yadlapati <venkat.yadlapati@yahoo.com>

dt-bindings: usb: snps,dwc3-common: Document usb-psy-name

This commit documents the usb-psy-name string property in the common
Synopsys DWC3 Devicetree binding schema.

> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> index 6c0b8b6538246..5d46db402f935 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> @@ -42,6 +42,13 @@ properties:
>      minItems: 1
>      maxItems: 19
>  
> +  usb-psy-name:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description:
> +      Name of the power supply that is told the current the USB host
> +      grants to the device (e.g. after enumeration), so the charger can
> +      draw it.
> +
>    phy-names:
>      minItems: 1
>      maxItems: 19

[Severity: Medium]
Should usb-psy-name be part of the Devicetree binding ABI rather than a
phandle reference?

In drivers/usb/dwc3/core.c, dwc3_get_usb_power_supply() passes
usb-psy-name to power_supply_get_by_name(), which matches against the
Linux-internal power_supply_desc.name string (such as "qcom-battmgr-usb").
Devicetree bindings describe hardware relationships between devices using
phandles (for example, power-supplies or a usb-connector graph link)
rather than Linux driver registration names, which are normally only used
by legacy board files or software_node glue.

In addition, the qcom_battmgr use case mentioned in the patch notes will
not work at runtime: dwc3_vbus_draw_work() calls
power_supply_set_property() with POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
but neither sm8350_usb_psy_desc nor sc8280xp_usb_psy_desc in
drivers/power/supply/qcom_battmgr.c defines a .set_property callback, so
power_supply_set_property() always returns -ENODEV.

Also, this places usb-psy-name in the middle of the paired phys and
phy-names properties.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-vantage-dwc3-v1-1-6abb5a3277f0@yahoo.com?part=1

      reply	other threads:[~2026-11-15 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 20:20 [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name Venkat Yadlapati via B4 Relay
2026-11-15 20:30 ` sashiko-bot [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=sashiko-outbox-215815@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=venkat.yadlapati@yahoo.com \
    /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