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-quadspi: fix unclocked access on unbind

Make sure that the controller is runtime resumed before disabling it
during driver unbind to avoid an unclocked register access.

This issue was flagged by Sashiko when reviewing a controller
deregistration fix.

Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support")
Cc: stable@vger.kernel.org # 6.7
Cc: Dhruva Gole <d-gole@ti.com>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=2
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421125354.1534871-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Johan Hovold and committed by
Mark Brown
233db2cb cba53fe2

+3 -4
+3 -4
drivers/spi/spi-cadence-quadspi.c
··· 2024 2024 if (cqspi->rx_chan) 2025 2025 dma_release_channel(cqspi->rx_chan); 2026 2026 2027 - cqspi_controller_enable(cqspi, 0); 2028 - 2029 - 2030 2027 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) 2031 2028 ret = pm_runtime_get_sync(&pdev->dev); 2032 2029 2033 - if (ret >= 0) 2030 + if (ret >= 0) { 2031 + cqspi_controller_enable(cqspi, 0); 2034 2032 clk_bulk_disable_unprepare(CLK_QSPI_NUM, cqspi->clks); 2033 + } 2035 2034 2036 2035 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) { 2037 2036 pm_runtime_put_sync(&pdev->dev);