[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TYCPR01MB110400F8DCB038CC28BC5C04BD8B52@TYCPR01MB11040.jpnprd01.prod.outlook.com>
Date: Tue, 8 Apr 2025 12:37:28 +0000
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: Prabhakar <prabhakar.csengg@...il.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Geert Uytterhoeven <geert+renesas@...der.be>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
CC: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>, Biju
Das <biju.das.jz@...renesas.com>, Claudiu Beznea
<claudiu.beznea.uj@...renesas.com>, Fabrizio Castro
<fabrizio.castro.jz@...esas.com>, Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH v2 3/3] usb: renesas_usbhs: Reorder clock handling and
power management in probe
Hello Prabhakar-san,
> From: Yoshihiro Shimoda, Sent: Tuesday, April 8, 2025 7:40 PM
<snip>
> > @@ -721,7 +736,7 @@ static int usbhs_probe(struct platform_device *pdev)
> > if (ret) {
> > dev_warn(dev, "USB function not selected (GPIO)\n");
> > ret = -ENOTSUPP;
> > - goto probe_end_mod_exit;
> > + goto probe_assert_rest;
nit:
I think that the label name " probe_assert_reset" or " probe_assert_rst" is better.
Anyway, I think that this patch seems good to me. So,
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Also, I tested this patch on my environment (R-Car H3) and it doesn't have any regression.
So,
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Best regards,
Yoshihiro Shimoda
> > }
> > }
> >
> > @@ -735,14 +750,19 @@ static int usbhs_probe(struct platform_device *pdev)
> > ret = usbhs_platform_call(priv, hardware_init, pdev);
> > if (ret < 0) {
> > dev_err(dev, "platform init failed.\n");
> > - goto probe_end_mod_exit;
> > + goto probe_assert_rest;
> > }
> >
> > /* reset phy for connection */
> > usbhs_platform_call(priv, phy_reset, pdev);
> >
> > - /* power control */
> > - pm_runtime_enable(dev);
> > + /*
> > + * Disable the clocks that were enabled earlier in the probe path,
> > + * and let the driver handle the clocks beyond this point.
> > + */
> > + usbhsc_clk_disable_unprepare(priv);
> > + pm_runtime_put(dev);
> > +
> > if (!usbhs_get_dparam(priv, runtime_pwctrl)) {
> > usbhsc_power_ctrl(priv, 1);
> > usbhs_mod_autonomy_mode(priv);
> > @@ -759,9 +779,7 @@ static int usbhs_probe(struct platform_device *pdev)
> >
> > return ret;
> >
> > -probe_end_mod_exit:
> > - usbhsc_clk_put(priv);
> > -probe_fail_clks:
> > +probe_assert_rest:
> > reset_control_assert(priv->rsts);
> > probe_fail_rst:
> > usbhs_mod_remove(priv);
> > @@ -769,6 +787,14 @@ static int usbhs_probe(struct platform_device *pdev)
> > usbhs_fifo_remove(priv);
> > probe_end_pipe_exit:
> > usbhs_pipe_remove(priv);
> > +probe_clk_dis_unprepare:
> > + usbhsc_clk_disable_unprepare(priv);
> > +probe_pm_put:
> > + pm_runtime_put(dev);
> > +probe_clk_put:
> > + usbhsc_clk_put(priv);
> > +probe_pm_disable:
> > + pm_runtime_disable(dev);
> >
> > dev_info(dev, "probe failed (%d)\n", ret);
> >
> > --
> > 2.49.0
Powered by blists - more mailing lists