Commit 8592eb95 authored by Douglas Anderson's avatar Douglas Anderson Committed by Bjorn Andersson

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

In commit cff80645 ("spi: spi-qcom-qspi: 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: cff80645 ("spi: spi-qcom-qspi: Add interconnect support")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarRajendra Nayak <rnayak@codeaurora.org>
Tested-by: default avatarRajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: default avatarMukesh Kumar Savaliya <msavaliy@codeaurora.org>
Reviewed-by: default avatarAkash Asthana <akashast@codeaurora.org>
Link: https://lore.kernel.org/r/20200709075113.v2.2.I3c56d655737c89bd9b766567a04b0854db1a4152@changeidSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 21243314
...@@ -553,6 +553,8 @@ static int qcom_qspi_probe(struct platform_device *pdev) ...@@ -553,6 +553,8 @@ static int qcom_qspi_probe(struct platform_device *pdev)
goto exit_probe_master_put; goto exit_probe_master_put;
} }
pm_runtime_use_autosuspend(dev);
pm_runtime_set_autosuspend_delay(dev, 250);
pm_runtime_enable(dev); pm_runtime_enable(dev);
ret = spi_register_master(master); ret = spi_register_master(master);
......
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