aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Kleine-Budde <[email protected]>2020-09-17 22:24:20 +0200
committerMark Brown <[email protected]>2020-09-23 19:59:32 +0100
commitbf253e6bf6b876a4ce74db7dcf8a13b80d84aa5f (patch)
tree7313d444acaa0e5a2d74d688873eed0517c0a427
parent7b1d96813317358312440d0d07abbfbeb0ef8d22 (diff)
spi: spi-imx: spi_imx_transfer(): add support for effective_speed_hz
This patch implementes the reporting of the effectivly used speed_hz for the transfer by setting tfr->effective_speed_hz. See the following patch, which adds this feature to the SPI core for more information: 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer Signed-off-by: Marc Kleine-Budde <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/spi/spi-imx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 197f60632072..5158c48bd4db 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1503,6 +1503,8 @@ static int spi_imx_transfer(struct spi_device *spi,
{
struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master);
+ transfer->effective_speed_hz = spi_imx->spi_bus_clk;
+
/* flush rxfifo before transfer */
while (spi_imx->devtype_data->rx_available(spi_imx))
readl(spi_imx->base + MXC_CSPIRXDATA);