Linux-SPI Archive on
 help / color / Atom feed
* [PATCH] spi: rockchip: enable autosuspend feature
@ 2020-10-16  8:50 Alexander Kochetkov
  0 siblings, 0 replies; only message in thread
From: Alexander Kochetkov @ 2020-10-16  8:50 UTC (permalink / raw)
  To: Mark Brown, Heiko Stuebner
  Cc: linux-spi, linux-arm-kernel, linux-rockchip, linux-kernel,
	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.

Signed-off-by: Alexander Kochetkov <>
 drivers/spi/spi-rockchip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 2cc6d9951b52..3e77b1a79bc8 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -157,6 +157,8 @@
 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  8:50 [PATCH] spi: rockchip: enable autosuspend feature Alexander Kochetkov

Linux-SPI Archive on

Archives are clonable:
	git clone --mirror linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ \
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone