Commit cfdab2cd authored by Douglas Anderson's avatar Douglas Anderson Committed by Mark Brown

spi: spi-geni-qcom: Set an autosuspend delay of 250 ms

In commit 0e3b8a81 ("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: 0e3b8a81 ("spi: spi-geni-qcom: Add interconnect support")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: Akash Asthana<akashast@codeaurora.org>
Link: https://lore.kernel.org/r/20200701174506.2.I9b8f6bb1e7e6d8847e2ed2cf854ec55678db427f@changeidSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d9352996
...@@ -619,6 +619,8 @@ static int spi_geni_probe(struct platform_device *pdev) ...@@ -619,6 +619,8 @@ static int spi_geni_probe(struct platform_device *pdev)
init_completion(&mas->cancel_done); init_completion(&mas->cancel_done);
init_completion(&mas->abort_done); init_completion(&mas->abort_done);
spin_lock_init(&mas->lock); spin_lock_init(&mas->lock);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, 250);
pm_runtime_enable(dev); pm_runtime_enable(dev);
ret = spi_geni_init(mas); ret = spi_geni_init(mas);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment