summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-geni-qcom.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2020-07-01 17:45:08 -0700
committerMark Brown <broonie@kernel.org>2020-07-07 14:11:01 +0100
commitcfdab2cd85ecd3f98837e5cc59dd3319cd9b6fff (patch)
tree27f0cf2ffa948b5ab68d20f15aebf293689901d2 /drivers/spi/spi-geni-qcom.c
parentd93529962d2aaee599157911894af2a791979e9f (diff)
spi: spi-geni-qcom: Set an autosuspend delay of 250 ms
In commit 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") the spi_geni_runtime_suspend() and spi_geni_runtime_resume() became a bit slower. Measuring on my hardware I see numbers in the hundreds of microseconds now. Let's use autosuspend to help avoid some of the overhead. Now if we're doing a bunch of transfers we won't need to be constantly chruning. The number 250 ms for the autosuspend delay was picked a bit arbitrarily, so if someone has measurements showing a better value we could easily change this. Fixes: 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Akash Asthana<akashast@codeaurora.org> Link: https://lore.kernel.org/r/20200701174506.2.I9b8f6bb1e7e6d8847e2ed2cf854ec55678db427f@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-geni-qcom.c')
-rw-r--r--drivers/spi/spi-geni-qcom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index e99a9d57449f..1d96a7f32fda 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -619,6 +619,8 @@ static int spi_geni_probe(struct platform_device *pdev)
init_completion(&mas->cancel_done);
init_completion(&mas->abort_done);
spin_lock_init(&mas->lock);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 250);
pm_runtime_enable(dev);
ret = spi_geni_init(mas);