[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB11346CA32F5E4B4329C46112D8630A@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Tue, 19 Aug 2025 06:34:12 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Claudiu.Beznea <claudiu.beznea@...on.dev>, "vkoul@...nel.org"
<vkoul@...nel.org>, "kishon@...nel.org" <kishon@...nel.org>,
"robh@...nel.org" <robh@...nel.org>, "krzk+dt@...nel.org"
<krzk+dt@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>, "geert+renesas@...der.be"
<geert+renesas@...der.be>, magnus.damm <magnus.damm@...il.com>, Yoshihiro
Shimoda <yoshihiro.shimoda.uh@...esas.com>
CC: "linux-phy@...ts.infradead.org" <linux-phy@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...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>
Subject: RE: [PATCH v5 2/7] phy: renesas: rcar-gen3-usb2: Fix an error
handling path in rcar_gen3_phy_usb2_probe()
Hi Claudiu,
> -----Original Message-----
> From: claudiu beznea <claudiu.beznea@...on.dev>
> Sent: 19 August 2025 07:01
> Subject: Re: [PATCH v5 2/7] phy: renesas: rcar-gen3-usb2: Fix an error handling path in
> rcar_gen3_phy_usb2_probe()
>
> Hi, Biju,
>
> On 8/19/25 08:49, Biju Das wrote:
> > Hi Claudiu, Christophe,
> >
> > Thanks for the patch.
> >
> >> -----Original Message-----
> >> From: Claudiu <claudiu.beznea@...on.dev>
> >> Sent: 19 August 2025 06:42
> >> Subject: [PATCH v5 2/7] phy: renesas: rcar-gen3-usb2: Fix an error
> >> handling path in
> >> rcar_gen3_phy_usb2_probe()
> >>
> >> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> >>
> >> If an error occurs after the reset_control_deassert(),
> >> reset_control_assert() must be called, as already done in the remove function.
> >>
> >> Use devm_add_action_or_reset() to add the missing call and simplify
> >> the
> >> .remove() function accordingly.
> >>
> >> Fixes: 4eae16375357 ("phy: renesas: rcar-gen3-usb2: Add support to
> >> initialize the bus")
> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> >> Reviewed-by: Biju Das <biju.das.jz@...renesas.com>
> >> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> >> [claudiu.beznea: removed "struct reset_control *rstc = data;" from
> >> rcar_gen3_reset_assert()]
> >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> >> ---
> >>
> >> Changes in v5:
> >> - none
> >>
> >> Changes in v4:
> >> - none
> >>
> >> Changes in v3:
> >> - collected tags
> >>
> >> Changes in v2:
> >> - none; this patch is new; re-spinned the Christophe's work at
> >>
> >> https://lore.kernel.org/all/TYCPR01MB113329930BA5E2149C9BE2A1986672@T
> >> YCPR01MB11332.jpnprd01.prod.outloo
> >> k.com/
> >>
> >>
> >> drivers/phy/renesas/phy-rcar-gen3-usb2.c | 11 ++++++++++-
> >> 1 file changed, 10 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> >> b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> >> index 47beb94cd424..d61c171d454f 100644
> >> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> >> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> >> @@ -699,6 +699,11 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
> >> return candidate;
> >> }
> >>
> >> +static void rcar_gen3_reset_assert(void *data) {
> >> + reset_control_assert(data);
> >> +}
> >> +
> >> static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel) {
> >> struct device *dev = channel->dev; @@ -717,6 +722,11 @@ static int
> >> rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
> >> if (ret)
> >> goto rpm_put;
> >>
> >> + ret = devm_add_action_or_reset(dev, rcar_gen3_reset_assert,
> >> + channel->rstc);
> >
> > Now 'rstc' can be removed from struct rcar_gen3_chan and use the local
> > rstc pointer as context variable here.
>
> I can drop it now but it will be added later (after this series) along with suspend to RAM support.
> That is the reason I preferred to still keep it.
There is a fixes tag which will be propagated to stable kernel.
If you don't have any plan to send new series, then it is OK I guess??
Cheers,
Biju
Powered by blists - more mailing lists