mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
spi: tegra210-quad: 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-2-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3cc1cb3073
commit
134a72373f
@ -1318,7 +1318,7 @@ static int tegra_qspi_probe(struct platform_device *pdev)
|
||||
exit_free_irq:
|
||||
free_irq(qspi_irq, tqspi);
|
||||
exit_pm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_force_suspend(&pdev->dev);
|
||||
tegra_qspi_deinit_dma(tqspi);
|
||||
return ret;
|
||||
}
|
||||
@ -1330,7 +1330,7 @@ static int tegra_qspi_remove(struct platform_device *pdev)
|
||||
|
||||
spi_unregister_master(master);
|
||||
free_irq(tqspi->irq, tqspi);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_force_suspend(&pdev->dev);
|
||||
tegra_qspi_deinit_dma(tqspi);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user