| From 6c21e9000bcf7bea794d404e93b853a4c4349ab9 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Fri, 20 Sep 2024 17:11:35 +0800 |
| Subject: =?UTF-8?q?spi:=20zynqmp-gqspi:=20Undo=20runtime=20PM=20changes=20?= |
| =?UTF-8?q?at=20driver=20exit=20time=E2=80=8B?= |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| From: Jinjie Ruan <ruanjinjie@huawei.com> |
| |
| [ 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: 9e3a000362ae ("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> |
| --- |
| drivers/spi/spi-zynqmp-gqspi.c | 2 ++ |
| 1 file changed, 2 insertions(+) |
| |
| diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c |
| index 237979daf9e67..1847e3485dfea 100644 |
| --- a/drivers/spi/spi-zynqmp-gqspi.c |
| +++ b/drivers/spi/spi-zynqmp-gqspi.c |
| @@ -1200,6 +1200,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev) |
| |
| clk_dis_all: |
| pm_runtime_disable(&pdev->dev); |
| + pm_runtime_dont_use_autosuspend(&pdev->dev); |
| pm_runtime_put_noidle(&pdev->dev); |
| pm_runtime_set_suspended(&pdev->dev); |
| clk_disable_unprepare(xqspi->refclk); |
| @@ -1230,6 +1231,7 @@ static void zynqmp_qspi_remove(struct platform_device *pdev) |
| zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0); |
| |
| pm_runtime_disable(&pdev->dev); |
| + pm_runtime_dont_use_autosuspend(&pdev->dev); |
| pm_runtime_put_noidle(&pdev->dev); |
| pm_runtime_set_suspended(&pdev->dev); |
| clk_disable_unprepare(xqspi->refclk); |
| -- |
| 2.43.0 |
| |