[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d6b857e-4bfe-45ef-a428-6e92f218f0c5@sirena.org.uk>
Date: Thu, 4 Dec 2025 15:11:22 +0000
From: Mark Brown <broonie@...nel.org>
To: Nishanth Menon <nm@...com>
Cc: Francesco Dolcini <francesco@...cini.it>,
Siddharth Vadapalli <s-vadapalli@...com>,
Anurag Dutta <a-dutta@...com>, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] spi: cadence-quadspi: Fix clock enable underflows due to
runtime PM
On Thu, Dec 04, 2025 at 08:05:30AM -0600, Nishanth Menon wrote:
> The clock is already turned off by the runtime-PM suspend callback, so an
> extra clk_disable*_unprepare() is only correct when runtime-PM support is
> not in use.
Right, I'm pretty sure that's where the extra disable is coming from.
The pm_runtime_set_active() further up the function is looking rather
suspect here.
> - clk_disable_unprepare(cqspi->clk);
> + /* Runtime-PM suspend already disables the core clock. */
> + if (ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))
> + clk_disable_unprepare(cqspi->clk);
This will leak the reference if runtime PM isn't enabled unfortunately,
no runtime PM operations will get called. Life would be vastly simpler
were that mandatory :(
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists