Re: [PATCH 1/2] usb: bcma: control VBUS via a regulator instead of a GPIO

From: Rafał Miłecki

Date: Mon Sep 21 2026 - 14:35:37 EST


niedz., 20 wrz 2026 o 23:14 Rosen Penev <rosenp@xxxxxxxxx> napisał(a):
> bcma-hcd drives the USB power line by grabbing the undocumented
> "vcc-gpio" from the controller node and poking it through gpiolib.
> Besides relying on a non-standard binding, this cannot work on boards
> such as the NETGEAR R7000 and R8000 where one chipcommon GPIO powers
> both the USB2 and USB3 cores: the two controllers each request that
> GPIO exclusively, so the second one fails with -EBUSY and its port
> stays dead.
>
> Use the standard regulator interface instead. Each core obtains its
> (shared) VBUS supply through devm_regulator_get_optional() and the
> regulator core reference-counts the enable/disable requests, allowing
> both controllers to drive one GPIO without conflicts.

You should add support for VBUS without dropping "vcc-gpio" for now.
Deprecate it. Give it some time and then submit a patch to drop it.

This patch as it stands also breaks bisectability (because it drops
"vcc-gpio" before switching to VBUS.

--
Rafał