Skip to content
/ linux Public

Commit f752cc3

Browse files
miquelraynalSasha Levin
authored andcommitted
spi: cadence-qspi: Try hard to disable the clocks
[ Upstream commit 612227b ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent cf2a37b commit f752cc3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/spi/spi-cadence-quadspi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,7 @@ static void cqspi_remove(struct platform_device *pdev)
20442044
const struct cqspi_driver_platdata *ddata;
20452045
struct cqspi_st *cqspi = platform_get_drvdata(pdev);
20462046
struct device *dev = &pdev->dev;
2047+
int ret = 0;
20472048

20482049
ddata = of_device_get_match_data(dev);
20492050

@@ -2059,8 +2060,10 @@ static void cqspi_remove(struct platform_device *pdev)
20592060
dma_release_channel(cqspi->rx_chan);
20602061

20612062
if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM)))
2062-
if (pm_runtime_get_sync(&pdev->dev) >= 0)
2063-
clk_disable(cqspi->clk);
2063+
ret = pm_runtime_get_sync(&pdev->dev);
2064+
2065+
if (ret >= 0)
2066+
clk_disable(cqspi->clk);
20642067

20652068
if (cqspi->is_jh7110)
20662069
cqspi_jh7110_disable_clk(pdev, cqspi);

0 commit comments

Comments
 (0)