Re: [PATCH] spi: dw-mmio: support suspend/resume

From: Andy Shevchenko

Date: Tue Jan 27 2026 - 11:09:27 EST


On Thu, Jan 22, 2026 at 05:57:42PM +0000, Mark Brown wrote:
> On Thu, Jan 22, 2026 at 11:50:46PM +0800, Jisheng Zhang wrote:

...

> > + clk_disable_unprepare(dwsmmio->pclk);
> > + clk_disable_unprepare(dwsmmio->clk);
>
> These were allocated using devm_clk_get_prepare_enable() so we shouldn't
> really be fiddling with the state at runtime. In practice this should
> always be fine I think but it's not really something we're supposed to
> be doing, in theory we could fail to resume and then end up doing a
> double disable on removal. Probably the open coded version would have
> the same issue though so perhaps this is pedantic...

We clearly can call clk_disable(), but I'm not sure unprepare is the stage that
has no side-effects here.

--
With Best Regards,
Andy Shevchenko