Skip to contentSkip to conversation

spi: atmel: Exposing effective spi speed

PATCH In review Thomas Kopp 2 participants 4 messages Sep 21, 2020 – Oct 1, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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 5d7e2b5ed585 ("spi: core: allow reporting the effectivly used speed_hz for a transfer")

---
 drivers/spi/spi-atmel.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-atmel.c +1 -0
index 2cfe6253a784..799229bc34e1 100644
@@ -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;
 }
Signature · 1 line
2.25.1
#1 lore raw
Quoted 26 lines

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")

---
 drivers/spi/spi-atmel.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-atmel.c +1 -0
index 2cfe6253a784..799229bc34e1 100644
@@ -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;
Quoted 3 lines

}
--
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

maintainer
#2 lore raw
Quoted 2 lines · On Thu, Oct 01, 2020 at 06:50:08AM +0000, [email protected] 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.

maintainer
#3 lore raw
In reply to Thomas Kopp
Quoted 6 lines · Thomas Kopp

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