spi: rockchip: enable autosuspend feature
Subsystems (2)
PATCH 1/1 spi: rockchip: enable autosuspend feature
If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear.
--- drivers/spi/spi-rockchip.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-rockchip.c +4 -0
@@ -157,6 +157,8 @@#define ROCKCHIP_SPI_MAX_CS_NUM 2 +#define ROCKCHIP_AUTOSUSPEND_TIMEOUT 2000 +struct rockchip_spi {struct device *dev;
@@ -670,6 +672,8 @@ static int rockchip_spi_probe(struct platform_device *pdev) goto err_disable_spiclk; } +pm_runtime_set_autosuspend_delay (&pdev->dev,ROCKCHIP_AUTOSUSPEND_TIMEOUT ); +pm_runtime_use_autosuspend (&pdev->dev);pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev);
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 4 lines · Alexander Kochetkov
If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: rockchip: enable autosuspend feature
commit: 940f3bbf3dacd6e31e482a10e64c96e69b00dded
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark