summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-09-19 14:03:10 +0200
committerMark Brown <broonie@kernel.org>2023-09-19 14:17:52 +0200
commit4221a2bec2189275f3f49492a73221498ae6d131 (patch)
tree0be258a22877197c074903e61d010a0541b95c15 /drivers/spi
parentspi: imx: Take in account bits per word instead of assuming 8-bits (diff)
parentspi: zynqmp-gqspi: fix clock imbalance on probe failure (diff)
downloadlinux-4221a2bec2189275f3f49492a73221498ae6d131.tar.xz
linux-4221a2bec2189275f3f49492a73221498ae6d131.zip
spi: Merge up old fix
This fix was originally queued at the end of the 6.4 cycle but as it was minor it never actually got sent.
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-zynqmp-gqspi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 94d9a33d9af5..9a46b2478f4e 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1340,9 +1340,9 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
return 0;
clk_dis_all:
- pm_runtime_put_sync(&pdev->dev);
- pm_runtime_set_suspended(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
clk_disable_unprepare(xqspi->refclk);
clk_dis_pclk:
clk_disable_unprepare(xqspi->pclk);
@@ -1366,11 +1366,15 @@ static void zynqmp_qspi_remove(struct platform_device *pdev)
{
struct zynqmp_qspi *xqspi = platform_get_drvdata(pdev);
+ pm_runtime_get_sync(&pdev->dev);
+
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
+
+ pm_runtime_disable(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
clk_disable_unprepare(xqspi->refclk);
clk_disable_unprepare(xqspi->pclk);
- pm_runtime_set_suspended(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
}
MODULE_DEVICE_TABLE(of, zynqmp_qspi_of_match);