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
This commit is contained in:
commit
65fbec3121
@ -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 @@ out_register_controller:
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user