[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXklYtTg-pqrT5sw@smile.fi.intel.com>
Date: Tue, 27 Jan 2026 22:51:46 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Mark Brown <broonie@...nel.org>
Cc: Jisheng Zhang <jszhang@...nel.org>, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: dw-mmio: support suspend/resume
On Tue, Jan 27, 2026 at 04:07:11PM +0000, Mark Brown wrote:
> On Tue, Jan 27, 2026 at 05:01:54PM +0100, Andy Shevchenko wrote:
> > On Thu, Jan 22, 2026 at 05:57:42PM +0000, Mark Brown wrote:
>
> > > 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.
>
> What makes you say that disable is OK?
It's (assumed to be) paired with clk_enable() in the resume.
I was talking from CLK usage perspective. However, after looking
at the resume implementation in drivers/base/power/main.c I think
the failed resume of one device doesn't prevent it's removal or
anything. It just collects statistics and records an error, but
no other actions are taken. Which means anything that needs to
be paired between suspend/resume and not checked at remove or
shutdown is prone to the same problem.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists