diff mbox series

[v2] spi: atmel: Exposing effective spi speed

Message ID 20200921071036.2091-1-thomas.kopp@microchip.com (mailing list archive)
State Accepted
Commit 23f370c748580643d17b5e064478b89cba3fdc78
Headers show
Series [v2] spi: atmel: Exposing effective spi speed | expand

Commit Message

Thomas Kopp Sept. 21, 2020, 7:10 a.m. UTC
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>
---
 drivers/spi/spi-atmel.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Kopp Oct. 1, 2020, 6:50 a.m. UTC | #1
> 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>
> ---
>  drivers/spi/spi-atmel.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 2cfe6253a784..799229bc34e1 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -859,6 +859,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;
>  }
> --
> 2.25.1

Hi Mark,

I realized I only sent this to the list, not to you on to/cc. Can you consider 
pulling this please?

Thanks,
Thomas
Mark Brown Oct. 1, 2020, 4:29 p.m. UTC | #2
On Thu, Oct 01, 2020 at 06:50:08AM +0000, Thomas.Kopp@microchip.com wrote:

> I realized I only sent this to the list, not to you on to/cc. Can you consider 
> pulling this please?

In cases like this please just resend the patch so people have it in
their inbox, people's workflows tend to be based around handling things
in their inboxes.
Mark Brown Oct. 1, 2020, 10:47 p.m. UTC | #3
On Mon, 21 Sep 2020 09:10:36 +0200, Thomas Kopp wrote:
> 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")

Applied to

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

Thanks!

[1/1] spi: atmel: Exposing effective spi speed
      commit: 23f370c748580643d17b5e064478b89cba3fdc78

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-atmel.c b/drivers/spi/spi-atmel.c
index 2cfe6253a784..799229bc34e1 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -859,6 +859,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;
 }