summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-10-24 00:59:50 +0200
committerMark Brown <broonie@kernel.org>2021-10-26 21:03:58 +0200
commit3cc1cb30735286dffba8a0675de4baaf2891aee1 (patch)
tree3b5ec4f226b6b5e89a3ee0618e1064956f5ae608 /drivers/spi/spi-tegra20-slink.c
parentspi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe() (diff)
downloadlinux-3cc1cb30735286dffba8a0675de4baaf2891aee1.tar.xz
linux-3cc1cb30735286dffba8a0675de4baaf2891aee1.zip
spi: tegra20-slink: Put device into suspend on driver removal
pm_runtime_disable() cancels all pending power requests, while they should be completed for the Tegra SPI driver. Otherwise SPI clock won't be disabled ever again because clk refcount will become unbalanced. Enforce runtime PM suspension to put device into expected state before driver is unbound and device's RPM state is reset by driver's core. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20211023225951.14253-1-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 33302f6b42d7..e6b16131edc2 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1124,7 +1124,7 @@ exit_free_irq:
exit_pm_put:
pm_runtime_put(&pdev->dev);
exit_pm_disable:
- pm_runtime_disable(&pdev->dev);
+ pm_runtime_force_suspend(&pdev->dev);
tegra_slink_deinit_dma_param(tspi, false);
exit_rx_dma_free:
@@ -1143,7 +1143,7 @@ static int tegra_slink_remove(struct platform_device *pdev)
free_irq(tspi->irq, tspi);
- pm_runtime_disable(&pdev->dev);
+ pm_runtime_force_suspend(&pdev->dev);
if (tspi->tx_dma_chan)
tegra_slink_deinit_dma_param(tspi, false);