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

Tommaso Merciai tommaso.merciai.xr at bp.renesas.com
Mon Oct 6 05:53:52 PDT 2025


Hi Mark,
Thanks for your comment.

On Mon, Oct 06, 2025 at 12:52:29PM +0100, Mark Brown wrote:
> 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.

Yep you are right.
I will fix that in v2 dropping this unnecessary patch.

Thanks & Regards,
Tommaso




More information about the linux-phy mailing list