Commit 65fbec31 authored by Mark Brown's avatar Mark Brown

spi: Fix pm_runtime_set_suspended() with runtime pm

Merge series from Jinjie Ruan <ruanjinjie@huawei.com>:

Fix pm_runtime_set_suspended() with runtime pm enabled, and fix the missing
check for spi-cadence.

Jinjie Ruan (3):
  spi: spi-imx: Fix pm_runtime_set_suspended() with runtime pm enabled
  spi: spi-cadence: Fix pm_runtime_set_suspended() with runtime pm
    enabled
  spi: spi-cadence: Fix missing spi_controller_is_target() check

 drivers/spi/spi-cadence.c | 8 +++++---
 drivers/spi/spi-imx.c     | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

--
2.34.1
parents 68a16708 3eae4a91
......@@ -678,8 +678,8 @@ static int cdns_spi_probe(struct platform_device *pdev)
clk_dis_all:
if (!spi_controller_is_target(ctlr)) {
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
}
remove_ctlr:
spi_controller_put(ctlr);
......@@ -701,8 +701,10 @@ static void cdns_spi_remove(struct platform_device *pdev)
cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_disable(&pdev->dev);
if (!spi_controller_is_target(ctlr)) {
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
}
spi_unregister_controller(ctlr);
}
......
......@@ -1865,8 +1865,8 @@ static int spi_imx_probe(struct platform_device *pdev)
spi_imx_sdma_exit(spi_imx);
out_runtime_pm_put:
pm_runtime_dont_use_autosuspend(spi_imx->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_disable(spi_imx->dev);
pm_runtime_set_suspended(&pdev->dev);
clk_disable_unprepare(spi_imx->clk_ipg);
out_put_per:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment