diff mbox series

[6/9] spi: axi-spi-engine: implement xfer->cs_change_delay

Message ID 20231204-axi-spi-engine-series-2-v1-6-063672323fce@baylibre.com
State Accepted
Commit 125a8390995df1a350e9e16e6da11d010e1e7f76
Headers show
Series spi: axi-spi-engine: improvements round 2 | expand

Commit Message

David Lechner Dec. 4, 2023, 5:33 p.m. UTC
This adds handling of xfer->cs_change_delay to the AXI SPI Engine
driver.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/spi/spi-axi-spi-engine.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
index 84ec37732d8b..3437829ef8b1 100644
--- a/drivers/spi/spi-axi-spi-engine.c
+++ b/drivers/spi/spi-axi-spi-engine.c
@@ -265,6 +265,10 @@  static void spi_engine_compile_message(struct spi_message *msg, bool dry,
 				if (!xfer->cs_off)
 					spi_engine_gen_cs(p, dry, spi, false);
 
+				spi_engine_gen_sleep(p, dry, spi_delay_to_ns(
+					&xfer->cs_change_delay, xfer),
+					xfer->effective_speed_hz);
+
 				if (!list_next_entry(xfer, transfer_list)->cs_off)
 					spi_engine_gen_cs(p, dry, spi, true);
 			}