* [PATCH] spi: atmel: Exposing effective spi speed
@ 2020-09-18 10:37 Thomas Kopp
2020-09-21 6:02 ` Tudor.Ambarus
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Kopp @ 2020-09-18 10:37 UTC (permalink / raw)
To: linux-spi; +Cc: thomas.kopp, tudor.ambarus
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:
5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer
Signed-off-by: Thomas Kopp <thomas.kopp@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..86857c8408b1 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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] spi: atmel: Exposing effective spi speed
2020-09-18 10:37 [PATCH] spi: atmel: Exposing effective spi speed Thomas Kopp
@ 2020-09-21 6:02 ` Tudor.Ambarus
2020-09-21 6:03 ` Tudor.Ambarus
0 siblings, 1 reply; 3+ messages in thread
From: Tudor.Ambarus @ 2020-09-21 6:02 UTC (permalink / raw)
To: Thomas.Kopp, linux-spi
Hi, Thomas,
On 9/18/20 1:37 PM, 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:
>
> 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer
s/effectivly/effectively
./scripts/checkpatch.pl --strict raises an error here, the commit should be
referred as commit 5d7e2b5ed585 ("spi: core: allow reporting the effectivly used speed_hz for a transfer")
>
> Signed-off-by: Thomas Kopp <thomas.kopp@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..86857c8408b1 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;
spaces preferred around that '/'
with these addressed one can add:
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Cheers,
ta
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] spi: atmel: Exposing effective spi speed
2020-09-21 6:02 ` Tudor.Ambarus
@ 2020-09-21 6:03 ` Tudor.Ambarus
0 siblings, 0 replies; 3+ messages in thread
From: Tudor.Ambarus @ 2020-09-21 6:03 UTC (permalink / raw)
To: Thomas.Kopp, linux-spi
On 9/21/20 9:02 AM, Tudor Ambarus - M18064 wrote:
> Hi, Thomas,
>
> On 9/18/20 1:37 PM, 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:
>>
>> 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer
>
> s/effectivly/effectively
oops, please ignore this, don't change the commit subject.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-21 6:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-18 10:37 [PATCH] spi: atmel: Exposing effective spi speed Thomas Kopp
2020-09-21 6:02 ` Tudor.Ambarus
2020-09-21 6:03 ` Tudor.Ambarus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).