]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-geni-qcom: Don't set the cs if it was already right
authorDouglas Anderson <dianders@chromium.org>
Fri, 26 Jun 2020 22:19:50 +0000 (15:19 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 29 Jun 2020 18:14:06 +0000 (19:14 +0100)
commit2fe249e552e9b592b0d7537f75303d2e1adbd029
tree7003e64d2ee9c5b131a59b355a13f33b39a8c127
parent5fca598d6aeb70573e41c50b35432a5bb22d0e87
spi: spi-geni-qcom: Don't set the cs if it was already right

Setting the chip select on the Qualcomm geni SPI controller isn't
exactly cheap.  Let's cache the current setting and avoid setting the
chip select if it's already right.

Using "flashrom" to read or write the EC firmware on a Chromebook
shows roughly a 25% reduction in interrupts and a 15% speedup.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200626151946.1.I06134fd669bf91fd387dc6ecfe21d44c202bd412@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-geni-qcom.c