diff options
author | Thomas Kopp <thomas.kopp@microchip.com> | 2020-09-21 10:10:36 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-02 01:45:26 +0300 |
commit | 23f370c748580643d17b5e064478b89cba3fdc78 (patch) | |
tree | c5410cd122078fd750292bf5778728ba7db6d500 /drivers/spi | |
parent | 9d3621525018dbff2795e2bab17572fd20431234 (diff) | |
download | linux-23f370c748580643d17b5e064478b89cba3fdc78.tar.xz |
spi: atmel: Exposing effective spi speed
This patch implements the reporting of the effectively used speed_hz for
the transfer by setting xfer->effective_speed_hz.
See the following patch, which adds this feature to the SPI core for more
information:
commit 5d7e2b5ed585 ("spi: core: allow reporting the effectivly used speed_hz for a transfer")
Signed-off-by: Thomas Kopp <thomas.kopp@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20200921071036.2091-1-thomas.kopp@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-atmel.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 7c68d5cdbdc6..ce5bd06d49b7 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -858,6 +858,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as, csr = spi_readl(as, CSR0 + 4 * chip_select); csr = SPI_BFINS(SCBR, scbr, csr); spi_writel(as, CSR0 + 4 * chip_select, csr); + xfer->effective_speed_hz = bus_hz / scbr; return 0; } |