aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Anderson <[email protected]>2020-07-09 07:51:45 -0700
committerBjorn Andersson <[email protected]>2020-07-13 16:17:15 -0700
commit8592eb959ad4878c29b09e82934a25ed7c81e3c7 (patch)
tree3dd481309ef5a166df0937cea7eb12451e3a0d5f
parent2124331411a1ee88437cdd426854253c173464ba (diff)
spi: spi-qcom-qspi: Set an autosuspend delay of 250 ms
In commit cff80645d6d3 ("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: cff80645d6d3 ("spi: spi-qcom-qspi: Add interconnect support") Signed-off-by: Douglas Anderson <[email protected]> Acked-by: Mark Brown <[email protected]> Reviewed-by: Rajendra Nayak <[email protected]> Tested-by: Rajendra Nayak <[email protected]> Reviewed-by: Mukesh Kumar Savaliya <[email protected]> Reviewed-by: Akash Asthana <[email protected]> Link: https://lore.kernel.org/r/20200709075113.v2.2.I3c56d655737c89bd9b766567a04b0854db1a4152@changeid Signed-off-by: Bjorn Andersson <[email protected]>
-rw-r--r--drivers/spi/spi-qcom-qspi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c
index 8fedc605ab7f..b8857a97f40a 100644
--- a/drivers/spi/spi-qcom-qspi.c
+++ b/drivers/spi/spi-qcom-qspi.c
@@ -553,6 +553,8 @@ static int qcom_qspi_probe(struct platform_device *pdev)
goto exit_probe_master_put;
}
+ pm_runtime_use_autosuspend(dev);
+ pm_runtime_set_autosuspend_delay(dev, 250);
pm_runtime_enable(dev);
ret = spi_register_master(master);