Skip to content

Commit 1b30a21

Browse files
Jinjie Ruanmehmetb0
Jinjie Ruan
authored andcommitted
spi: zynqmp-gqspi: Undo runtime PM changes at driver exit time​
BugLink: https://bugs.launchpad.net/bugs/2095283 [ Upstream commit 2219576883e709737f3100aa9ded84976be49bd7 ] It's important to undo pm_runtime_use_autosuspend() with pm_runtime_dont_use_autosuspend() at driver exit time. So, call pm_runtime_dont_use_autosuspend() at driver exit time to fix it. Fixes: 9e3a000 ("spi: zynqmp: Add pm runtime support") Signed-off-by: Jinjie Ruan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent fdfb49e commit 1b30a21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi-zynqmp-gqspi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
12001200

12011201
clk_dis_all:
12021202
pm_runtime_disable(&pdev->dev);
1203+
pm_runtime_dont_use_autosuspend(&pdev->dev);
12031204
pm_runtime_put_noidle(&pdev->dev);
12041205
pm_runtime_set_suspended(&pdev->dev);
12051206
clk_disable_unprepare(xqspi->refclk);
@@ -1230,6 +1231,7 @@ static void zynqmp_qspi_remove(struct platform_device *pdev)
12301231
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
12311232

12321233
pm_runtime_disable(&pdev->dev);
1234+
pm_runtime_dont_use_autosuspend(&pdev->dev);
12331235
pm_runtime_put_noidle(&pdev->dev);
12341236
pm_runtime_set_suspended(&pdev->dev);
12351237
clk_disable_unprepare(xqspi->refclk);

0 commit comments

Comments
 (0)