spi: rspi: Use requested instead of maximum bit rate
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 8 Jun 2020 09:59:34 +0000 (11:59 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 9 Jun 2020 11:26:33 +0000 (12:26 +0100)
commite0fe70051f12c25c4afb04cb10ca8648c6e761cf
tree48cad74b6a0d144e979e9682a0f30fa0baf459a6
parent9ec8ade812240f3ef553b5e8bfc74deec3f14339
spi: rspi: Use requested instead of maximum bit rate

Currently, the RSPI driver always tries to use the maximum configured
bit rate for communicating with a slave device, even if the transfer(s)
in the current message specify a lower rate.

Use the mininum rate specified in the message instead.
Rename rspi_data.max_speed_hz accordingly.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200608095940.30516-3-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-rspi.c