mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: "Felix Gu" <ustc.gu@gmail.com>, "Vinod Koul" <vkoul@kernel.org>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>,
	"漆鹏振 (Qi Pengzhen)" <aric.pzqi@ingenic.com>
Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phy: ingenic: fix unbalanced regulator disable in exit
Date: Sun, 06 Sep 2026 17:28:54 +0200	[thread overview]
Message-ID: <9985dcd7b614e0876b7052ed703d4c186632f877.camel@crapouillou.net> (raw)
In-Reply-To: <20260906-ingenic-v1-1-2311f3df8ddc@gmail.com>

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@gmail.com>

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@crapouillou.net>

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@gmail.com>

  reply	other threads:[~2026-09-06 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 13:30 Felix Gu
2026-09-06 15:28 ` Paul Cercueil [this message]
2026-10-12  8:58 ` Manivannan Sadhasivam
2026-11-12  9:03 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9985dcd7b614e0876b7052ed703d4c186632f877.camel@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=aric.pzqi@ingenic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=ustc.gu@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®