* [PATCH RESEND] usb: phy: generic: request the vbus supply only when it is described
@ 2026-11-17 9:19 Yang Siyuan
2026-11-17 9:30 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
0 siblings, 2 replies; 4+ messages in thread
From: Yang Siyuan @ 2026-11-17 9:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel
usb_phy_gen_create_phy() unconditionally asks for an exclusive "vbus"
regulator. The legacy usb_phy_generic platform device registered by USB
glue drivers (e.g. sunxi MUSB) has no firmware node, so the lookup ends
up in the dummy-regulator path and the regulator core warns:
usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for
exclusive requests (id=vbus)
Only issue the request when the device firmware actually describes a
vbus-supply, and keep treating -ENODEV as "not present".
Signed-off-by: Yang Siyuan <hsyysy@163.com>
---
drivers/usb/phy/phy-generic.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index de26b3023..24b7ba536 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -238,7 +238,17 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop)
return dev_err_probe(dev, PTR_ERR(nop->vcc),
"could not get vcc regulator\n");
- nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
+ /*
+ * vbus is an optional supply that only exists when the firmware
+ * describes it. The legacy usb_phy_generic devices registered by USB
+ * glue drivers have no firmware node, and requesting an exclusive
+ * dummy supply only makes the regulator core warn.
+ */
+ if (device_property_present(dev, "vbus-supply"))
+ nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
+ else
+ nop->vbus_draw = NULL;
+
if (PTR_ERR(nop->vbus_draw) == -ENODEV)
nop->vbus_draw = NULL;
if (IS_ERR(nop->vbus_draw))
base-commit: 091b06388b117fefdcb63336ac09956a4914b961
--
2.56.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] usb: phy: generic: request the vbus supply only when it is described
2026-11-17 9:19 [PATCH RESEND] usb: phy: generic: request the vbus supply only when it is described Yang Siyuan
@ 2026-11-17 9:30 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
1 sibling, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-17 9:30 UTC (permalink / raw)
To: Yang Siyuan; +Cc: linux-usb
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: phy: generic: missing Fixes trailer for commit 03e607cbb293
--
commit 56f1331b1fa011c1da842446fa9ad5d7fb41931f
Author: Yang Siyuan <hsyysy@163.com>
> usb: phy: generic: request the vbus supply only when it is described
>
> usb_phy_gen_create_phy() unconditionally asks for an exclusive "vbus"
> regulator. The legacy usb_phy_generic platform device registered by USB
> glue drivers (e.g. sunxi MUSB) has no firmware node, so the lookup ends
> up in the dummy-regulator path and the regulator core warns:
>
> usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for
> exclusive requests (id=vbus)
>
> Only issue the request when the device firmware actually describes a
> vbus-supply, and keep treating -ENODEV as "not present".
>
> Signed-off-by: Yang Siyuan <hsyysy@163.com>
[Severity: Low]
Since this fixes the unconditional devm_regulator_get_exclusive() call,
should the commit message include a Fixes tag?
Fixes: 03e607cbb293 ("usb: phy: generic: Get the vbus supply")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117091956.12103-1-hsyysy@163.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2] usb: phy: generic: request the vbus supply only when it is described
2026-11-17 9:19 [PATCH RESEND] usb: phy: generic: request the vbus supply only when it is described Yang Siyuan
2026-11-17 9:30 ` sashiko-bot
@ 2026-11-17 9:45 ` Yang Siyuan
2026-11-17 9:55 ` sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Yang Siyuan @ 2026-11-17 9:45 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel
usb_phy_gen_create_phy() unconditionally asks for an exclusive "vbus"
regulator. The legacy usb_phy_generic platform device registered by USB
glue drivers (e.g. sunxi MUSB) has no firmware node, so the lookup ends
up in the dummy-regulator path and the regulator core warns:
usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for
exclusive requests (id=vbus)
Only issue the request when the device firmware actually describes a
vbus-supply, and keep treating -ENODEV as "not present".
Fixes: 03e607cbb293 ("usb: phy: generic: Get the vbus supply")
Signed-off-by: Yang Siyuan <hsyysy@163.com>
---
Changes in v2:
- Add the Fixes tag suggested by Sashiko.
drivers/usb/phy/phy-generic.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index de26b3023..24b7ba536 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -238,7 +238,17 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop)
return dev_err_probe(dev, PTR_ERR(nop->vcc),
"could not get vcc regulator\n");
- nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
+ /*
+ * vbus is an optional supply that only exists when the firmware
+ * describes it. The legacy usb_phy_generic devices registered by USB
+ * glue drivers have no firmware node, and requesting an exclusive
+ * dummy supply only makes the regulator core warn.
+ */
+ if (device_property_present(dev, "vbus-supply"))
+ nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
+ else
+ nop->vbus_draw = NULL;
+
if (PTR_ERR(nop->vbus_draw) == -ENODEV)
nop->vbus_draw = NULL;
if (IS_ERR(nop->vbus_draw))
base-commit: 091b06388b117fefdcb63336ac09956a4914b961
--
2.56.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] usb: phy: generic: request the vbus supply only when it is described
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
@ 2026-11-17 9:55 ` sashiko-bot
0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-17 9:55 UTC (permalink / raw)
To: Yang Siyuan; +Cc: linux-usb
> usb_phy_gen_create_phy() unconditionally asks for an exclusive "vbus"
> regulator. The legacy usb_phy_generic platform device registered by USB
> glue drivers (e.g. sunxi MUSB) has no firmware node, so the lookup ends
> up in the dummy-regulator path and the regulator core warns:
>
> usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for
> exclusive requests (id=vbus)
>
> Only issue the request when the device firmware actually describes a
> vbus-supply, and keep treating -ENODEV as "not present".
>
> Fixes: 03e607cbb293 ("usb: phy: generic: Get the vbus supply")
>
> Signed-off-by: Yang Siyuan <hsyysy@163.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117094539.13527-1-hsyysy@163.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-17 9:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 9:19 [PATCH RESEND] usb: phy: generic: request the vbus supply only when it is described Yang Siyuan
2026-11-17 9:30 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
2026-11-17 9:55 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox