Skip to content

Commit d9cbc2f

Browse files
Thomas Koppambarus
authored andcommitted
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 5d7e2b5 ("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> (cherry picked from commit 23f370c) Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 621f44f commit d9cbc2f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/spi/spi-atmel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as,
857857
csr = spi_readl(as, CSR0 + 4 * chip_select);
858858
csr = SPI_BFINS(SCBR, scbr, csr);
859859
spi_writel(as, CSR0 + 4 * chip_select, csr);
860+
xfer->effective_speed_hz = bus_hz / scbr;
860861

861862
return 0;
862863
}

0 commit comments

Comments
 (0)