Re: [PATCH] spi: dw-mmio: support suspend/resume
From: Andy Shevchenko
Date: Tue Jan 27 2026 - 11:02:29 EST
On Thu, Jan 22, 2026 at 11:50:46PM +0800, Jisheng Zhang wrote:
> Add system wide suspend and resume support, the implementation is
> straightforward, just call spi_controller_suspend() then assert the
> reset and disable clks for suspend, enable clks and deassert reset
> then call spi_controller_resume() for resume.
...
> +static int dw_spi_mmio_resume(struct device *dev)
> +{
> + struct dw_spi_mmio *dwsmmio = dev_get_drvdata(dev);
> + clk_prepare_enable(dwsmmio->clk);
> + clk_prepare_enable(dwsmmio->pclk);
You forgot to check for an error code from the above.
> + reset_control_deassert(dwsmmio->rstc);
> +
> + return dw_spi_resume_controller(&dwsmmio->dws);
> +}
--
With Best Regards,
Andy Shevchenko