OSDN Git Service

spi: spi-sun6i: enable autosuspend feature
authorAlexander Kochetkov <al.kochet@gmail.com>
Mon, 19 Oct 2020 15:03:43 +0000 (18:03 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 23:29:05 +0000 (23:29 +0000)
commitae0f18bef30d0e76dd62be46c59b24c75f175092
treed7a93055b9c711852c770da98b2df15390407672
parent940f3bbf3dacd6e31e482a10e64c96e69b00dded
spi: spi-sun6i: 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.

The commit also remove unnecessary call to pm_runtime_idle() used
to explicit put device to suspended state. Without pm_runtime_idle() PM
core will put device in the suspended state just after probe() returns.

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20201019150343.2520-1-akochetkov@lintech.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sun6i.c