Re: [PATCH] phy: ingenic: fix unbalanced regulator disable in exit

From: Paul Cercueil

Date: Sun Sep 06 2026 - 11:29:26 EST


Hi Felix,

Le dimanche 06 septembre 2026 à 21:30 +0800, Felix Gu a écrit :
> exit() and power_off() both disable vcc_supply, so the regulator
> gets disabled twice for every power cycle, causing an unbalanced
> disable WARN.
>
> Drop the regulator_disable() call from the exit callback and leave
> the regulator to the power_on/power_off pair.
>
> Fixes: 31de313dfdcf ("PHY: Ingenic: Add USB PHY driver using generic
> PHY framework.")
> Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>

Yes, the doc of phy_exit() does say that it must be called after
phy_power_off() so the fix makes sense.

Reviewed-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>

Cheers,
-Paul

> ---
>  drivers/phy/ingenic/phy-ingenic-usb.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c
> b/drivers/phy/ingenic/phy-ingenic-usb.c
> index 7e62d46850fd..d8e5ef302b74 100644
> --- a/drivers/phy/ingenic/phy-ingenic-usb.c
> +++ b/drivers/phy/ingenic/phy-ingenic-usb.c
> @@ -124,7 +124,6 @@ static int ingenic_usb_phy_exit(struct phy *phy)
>   struct ingenic_usb_phy *priv = phy_get_drvdata(phy);
>  
>   clk_disable_unprepare(priv->clk);
> - regulator_disable(priv->vcc_supply);
>  
>   return 0;
>  }
>
> ---
> base-commit: 9d80aa4617b32f5054c5aa471d06b66704854935
> change-id: 20260906-ingenic-e558363993bf
>
> Best regards,
> -- 
> Felix Gu <ustc.gu@xxxxxxxxx>