[PATCH 07/18] regulator: devres: Disable exclusive regulator before releasing

Mark Brown broonie at kernel.org
Mon Oct 6 04:52:29 PDT 2025


On Fri, Oct 03, 2025 at 07:33:25PM +0200, Tommaso Merciai wrote:
> On Thu, Oct 02, 2025 at 05:29:19PM +0100, Mark Brown wrote:

> I will need to move the refcounting handlingfor the exclusive regulator
> at USB driver lvl.
> The drivers/phy/renesas/phy-rcar-gen3-usb2.c is using
> regulator_hardware_enable() for some USB otg channel. I think this is
> the reason why I need this patch to handle multiple unbind/bind.
> Without this I'm getting some WARN_ON(regulator->enable_count) doing
> multiple unbind/bind.

Are you sure it's not just that the driver doesn't always disable the
regulator before unbinding?  It only disables in the power off callback
so might leave a dangling reference behind.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-phy/attachments/20251006/a1d7cd43/attachment.sig>


More information about the linux-phy mailing list