diff mbox series

spi: spi-imx: spi_imx_transfer(): add support for effective_speed_hz

Message ID 20200917202420.1914104-1-mkl@pengutronix.de (mailing list archive)
State Accepted
Commit bf253e6bf6b876a4ce74db7dcf8a13b80d84aa5f
Headers show
Series spi: spi-imx: spi_imx_transfer(): add support for effective_speed_hz | expand

Commit Message

Marc Kleine-Budde Sept. 17, 2020, 8:24 p.m. UTC
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 <mkl@pengutronix.de>
---
 drivers/spi/spi-imx.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown Sept. 23, 2020, 7 p.m. UTC | #1
On Thu, 17 Sep 2020 22:24:20 +0200, Marc Kleine-Budde wrote:
> 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

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: spi-imx: spi_imx_transfer(): add support for effective_speed_hz
      commit: bf253e6bf6b876a4ce74db7dcf8a13b80d84aa5f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 38a5f1304cec..13692c69676f 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);