Re: [PATCH 2/4] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume

From: Geert Uytterhoeven

Date: Thu Nov 06 2025 - 09:53:06 EST


Hi Claudiu,

On Thu, 6 Nov 2025 at 15:36, Claudiu <claudiu.beznea@xxxxxxxxx> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> The Renesas RZ/G3S SoC supports a power-saving mode in which power to most
> of the SoC components is turned off, including the USB blocks. On the
> resume path, the reset signal must be de-asserted before applying any
> settings to the USB registers. To handle this properly, call
> reset_control_assert() and reset_control_deassert() during suspend and
> resume, respectively.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -454,6 +454,17 @@ static int __maybe_unused ehci_platform_suspend(struct device *dev)
> if (pdata->power_suspend)
> pdata->power_suspend(pdev);
>
> + ret = reset_control_assert(priv->rsts);
> + if (ret) {
> + if (pdata->power_on)
> + pdata->power_on(pdev);
> +
> + ehci_resume(hcd, false);
> +
> + if (priv->quirk_poll)
> + quirk_poll_init(priv);

I have my doubts about the effectiveness of this "reverse error
handling". If the reset_control_assert() failed, what are the chances
that the device will actually work after trying to bring it up again?

Same comment for next patch.

> + }
> +
> return ret;
> }
>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds