Skip to content

Commit c511cff

Browse files
Jinjie Ruansmb49
authored andcommitted
spi: zynqmp-gqspi: Undo runtime PM changes at driver exit time​
BugLink: https://bugs.launchpad.net/bugs/2101915 [ Upstream commit 2219576 ] 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 <ruanjinjie@huawei.com> Link: https://patch.msgid.link/20240920091135.2741574-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent a5410cd commit c511cff

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
@@ -1359,6 +1359,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
13591359

13601360
clk_dis_all:
13611361
pm_runtime_disable(&pdev->dev);
1362+
pm_runtime_dont_use_autosuspend(&pdev->dev);
13621363
pm_runtime_put_noidle(&pdev->dev);
13631364
pm_runtime_set_suspended(&pdev->dev);
13641365
clk_disable_unprepare(xqspi->refclk);
@@ -1389,6 +1390,7 @@ static void zynqmp_qspi_remove(struct platform_device *pdev)
13891390
zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
13901391

13911392
pm_runtime_disable(&pdev->dev);
1393+
pm_runtime_dont_use_autosuspend(&pdev->dev);
13921394
pm_runtime_put_noidle(&pdev->dev);
13931395
pm_runtime_set_suspended(&pdev->dev);
13941396
clk_disable_unprepare(xqspi->refclk);

0 commit comments

Comments
 (0)