mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Claudiu.Beznea <claudiu.beznea@tuxon.dev>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"kishon@kernel.org" <kishon@kernel.org>,
	"horms+renesas@verge.net.au" <horms+renesas@verge.net.au>,
	"fabrizio.castro@bp.renesas.com" <fabrizio.castro@bp.renesas.com>,
	"robh@kernel.org" <robh@kernel.org>
Cc: Claudiu.Beznea <claudiu.beznea@tuxon.dev>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH RFT 4/5] phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
Date: Fri, 21 Feb 2025 02:12:17 +0000	[thread overview]
Message-ID: <TYCPR01MB11040FFBFD60526158DFAE2D5D8C72@TYCPR01MB11040.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20250219160749.1750797-5-claudiu.beznea.uj@bp.renesas.com>

Hello Claudiu-san,

> From: Claudiu, Sent: Thursday, February 20, 2025 1:08 AM
> 
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> 
> Assert PLL reset on PHY power off. This saves power.
> 
> Fixes: f3b5a8d9b50d ("phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
>  drivers/phy/renesas/phy-rcar-gen3-usb2.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index 5c0ceba09b67..087937407b0b 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -537,9 +537,16 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
>  	struct rcar_gen3_chan *channel = rphy->ch;
>  	int ret = 0;
> 
> -	scoped_guard(spinlock_irqsave, &channel->lock)
> +	scoped_guard(spinlock_irqsave, &channel->lock) {
>  		rphy->powered = false;
> 
> +		if (rcar_gen3_are_all_rphys_power_off(channel)) {
> +			u32 val = readl(channel->base + USB2_USBCTR);
> +			val |= USB2_USBCTR_PLL_RST;

nit: According to the checkpatch.pl:
---
WARNING: Missing a blank line after declarations
#30: FILE: drivers/phy/renesas/phy-rcar-gen3-usb2.c:545:
+                       u32 val = readl(channel->base + USB2_USBCTR);
+                       val |= USB2_USBCTR_PLL_RST;
---

Best regards,
Yoshihiro Shimoda

> +			writel(val, channel->base + USB2_USBCTR);
> +		}
> +	}
> +
>  	if (channel->vbus)
>  		ret = regulator_disable(channel->vbus);
> 
> --
> 2.43.0


  reply	other threads:[~2025-02-21  2:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 16:07 [PATCH RFT 0/5] phy: renesas: rcar-gen3-usb2: Fixes for Renesas RZ/G3S Claudiu
2025-02-19 16:07 ` [PATCH RFT 1/5] phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind Claudiu
2025-02-19 16:07 ` [PATCH RFT 2/5] phy: renesas: rcar-gen3-usb2: Move IRQ request in probe Claudiu
2025-02-21  2:10   ` Yoshihiro Shimoda
2025-02-21  7:50     ` Geert Uytterhoeven
2025-02-19 16:07 ` [PATCH RFT 3/5] phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data Claudiu
2025-02-19 16:07 ` [PATCH RFT 4/5] phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off Claudiu
2025-02-21  2:12   ` Yoshihiro Shimoda [this message]
2025-02-19 16:07 ` [PATCH RFT 5/5] phy: renesas: rcar-gen3-usb2: Set timing registers only once Claudiu
2025-02-19 16:15 ` [PATCH RFT 0/5] phy: renesas: rcar-gen3-usb2: Fixes for Renesas RZ/G3S Claudiu Beznea
2025-02-21  2:07 ` Yoshihiro Shimoda

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=TYCPR01MB11040FFBFD60526158DFAE2D5D8C72@TYCPR01MB11040.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=horms+renesas@verge.net.au \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /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®