Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: cadence-qspi: Try hard to disable the clocks

In the remove path, we should try hard to perform all steps as we simply
cannot fail.

The "no runtime PM" quirk must only alter the state of the RPM core, but
the clocks should still be disabled if that is possible. Move the
disable call outside of the RPM quirk.

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Tested-by: Santhosh Kumar K <s-k6@ti.com>
Link: https://patch.msgid.link/20260122-schneider-6-19-rc1-qspi-v4-9-f9c21419a3e6@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Miquel Raynal (Schneider Electric) and committed by
Mark Brown
612227b3 f18c8cfa

+5 -2
+5 -2
drivers/spi/spi-cadence-quadspi.c
··· 2038 2038 const struct cqspi_driver_platdata *ddata; 2039 2039 struct cqspi_st *cqspi = platform_get_drvdata(pdev); 2040 2040 struct device *dev = &pdev->dev; 2041 + int ret = 0; 2041 2042 2042 2043 ddata = of_device_get_match_data(dev); 2043 2044 ··· 2058 2057 cqspi_jh7110_disable_clk(pdev, cqspi); 2059 2058 2060 2059 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) 2061 - if (pm_runtime_get_sync(&pdev->dev) >= 0) 2062 - clk_disable(cqspi->clk); 2060 + ret = pm_runtime_get_sync(&pdev->dev); 2061 + 2062 + if (ret >= 0) 2063 + clk_disable(cqspi->clk); 2063 2064 2064 2065 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) { 2065 2066 pm_runtime_put_sync(&pdev->dev);