Skip to contentSkip to conversation

phy: ingenic: fix unbalanced regulator disable in exit

PATCH Applied Felix Gu 4 participants 4 messages Sep 6 – Nov 12 Generic PHY framework

lore
Share & tools
lore

Felix Gu

author
#0 lore raw

PATCH 1/1 phy: ingenic: fix unbalanced regulator disable in exit

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.")
---
 drivers/phy/ingenic/phy-ingenic-usb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/phy/ingenic/phy-ingenic-usb.c +0 -1
index 7e62d46850fd..d8e5ef302b74 100644
@@ -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,

Signature · 1 line
Felix Gu <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw

Hi Felix,

Le dimanche 06 septembre 2026 à 21:30 +0800, Felix Gu a écrit :

Quoted 10 lines

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.")

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

Cheers,
-Paul

Quoted 25 lines

---
 drivers/phy/ingenic/phy-ingenic-usb.c | 1 -

 1 file changed, 1 deletion(-)
drivers/phy/ingenic/phy-ingenic-usb.c +0 -0
index 7e62d46850fd..d8e5ef302b74 100644
@@ -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);

drivers/phy/ingenic/phy-ingenic-usb.c +0 -1
-	regulator_disable(priv->vcc_supply);


  return 0;
 }

---
base-commit: 9d80aa4617b32f5054c5aa471d06b66704854935
change-id: 20260906-ingenic-e558363993bf

Best regards,
--
Felix Gu <[email protected]>

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Felix Gu
Quoted 9 lines · Felix Gu

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.")

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
maintainer Applied
#3 lore raw
In reply to Felix Gu
Quoted 8 lines · Felix Gu

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.

[...]

Applied, thanks!

[1/1] phy: ingenic: fix unbalanced regulator disable in exit

      commit: 71c1be5cc4e083852c8437bd6afcb99ee3050e8e

Best regards,

Signature · 1 line
~Vinod