mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Claudiu <claudiu.beznea@tuxon.dev>,
	yoshihiro.shimoda.uh@renesas.com, vkoul@kernel.org,
	kishon@kernel.org, geert+renesas@glider.be,
	magnus.damm@gmail.com, p.zabel@pengutronix.de
Cc: linux-renesas-soc@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH v2 1/2] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check
Date: Wed, 19 Nov 2025 15:49:33 +0100	[thread overview]
Message-ID: <165c7488-897b-4500-a7dc-a212cd64923e@linaro.org> (raw)
In-Reply-To: <20251119120418.686224-2-claudiu.beznea.uj@bp.renesas.com>

On 11/19/25 13:04, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> 
> Move the check of phy_data->init_bus from rcar_gen3_phy_usb2_init_bus()
> to rcar_gen3_phy_usb2_probe() to avoid having it duplicated in both the
> probe path and the upcoming resume code. This is a preparatory patch.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
> 
> Changes in v2:
> - none; this patch is new
> 
>   drivers/phy/renesas/phy-rcar-gen3-usb2.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index a38ead7c8055..b9d5bb52e02c 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> @@ -782,6 +782,9 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
>   	int ret;
>   	u32 val;
>   
> +	if (!channel->phy_data->init_bus)
> +		return 0;
> +
>   	rstc = devm_reset_control_array_get_shared(dev);
>   	if (IS_ERR(rstc))
>   		return PTR_ERR(rstc);
> @@ -861,11 +864,9 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
>   	platform_set_drvdata(pdev, channel);
>   	channel->dev = dev;
>   
> -	if (channel->phy_data->init_bus) {
> -		ret = rcar_gen3_phy_usb2_init_bus(channel);
> -		if (ret)
> -			goto error;
> -	}
> +	ret = rcar_gen3_phy_usb2_init_bus(channel);
> +	if (ret)
> +		goto error;
>   
>   	spin_lock_init(&channel->lock);
>   	for (i = 0; i < NUM_OF_PHYS; i++) {

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

  reply	other threads:[~2025-11-19 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 12:04 [PATCH v2 0/2] phy: renesas: rcar-gen3-usb2: Add suspend to RAM support Claudiu
2025-11-19 12:04 ` [PATCH v2 1/2] phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check Claudiu
2025-11-19 14:49   ` Neil Armstrong [this message]
2025-11-19 12:04 ` [PATCH v2 2/2] phy: renesas: rcar-gen3-usb2: Add suspend/resume support Claudiu
2025-11-19 14:49   ` Neil Armstrong
2025-11-20 17:11 ` [PATCH v2 0/2] phy: renesas: rcar-gen3-usb2: Add suspend to RAM support 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=165c7488-897b-4500-a7dc-a212cd64923e@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=geert+renesas@glider.be \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=vkoul@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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®