Skip to content

usb: phy: generic: Support enabling/disabling VBUS

Sean Anderson linux-devicetree linux-usb lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v14 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Fix dt_binding_check errors

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dt-bindings: usb: usb-nop-xceiv: Repurpose vbus-regulatorDocumentation/devicetree/bindings/usb/usb-nop-xceiv.yaml+4 -51 reply
2/4usb: phy: generic: Get the vbus supplydrivers/usb/phy/phy-generic.c+7 -00 replies
3/4usb: phy: generic: Implement otg->set_vbusdrivers/usb/phy/phy-generic.c+17 -280 replies
4/4usb: phy: generic: Disable vbus on removaldrivers/usb/phy/phy-generic.c+3 -00 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchLinus Walleij
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] usb: phy: generic: Support enabling/disabling VBUS

The generic USB phy has had VBUS-related code for a long time, but it has always been broken, since the regulator was never gotten from the device tree. However, the support itself seems not very useful, since e.g. usb_phy_vbus_on/off has no users and usb_phy_set_power is only used by gadgets to make sure they don't draw too much current. Instead, use the VBUS regulator to implement otg_set_vbus, which is called from several drivers. This results in a change in semantics of VBUS, but since support was always broken I don't think this will have any affect.

This got no (non-automated) feedback for an entire release cycle. I'm sending v2 with a wider CC list so hopefully someone can review it in time for 5.19.

Changes in v2:
- Fix dt_binding_check errors

Sean Anderson (4):
dt-bindings: usb: usb-nop-xceiv: Repurpose vbus-regulator
usb: phy: generic: Get the vbus supply
usb: phy: generic: Implement otg->set_vbus
usb: phy: generic: Disable vbus on removal

 .../bindings/usb/usb-nop-xceiv.yaml           |  9 ++-
 drivers/usb/phy/phy-generic.c                 | 55 +++++++++----------
 2 files changed, 31 insertions(+), 33 deletions(-)
Signature · 1 line
2.35.1.1320.gc452695387.dirty