summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2023-12-04 11:33:32 -0600
committerMark Brown <broonie@kernel.org>2023-12-06 14:19:34 +0000
commit125a8390995df1a350e9e16e6da11d010e1e7f76 (patch)
tree3ce2bcde857be344b7187ec051fddaaa655bcbaf /drivers/spi
parente006c181dd9ab006d7b0982d35ef7951fbffe825 (diff)
downloadlinux-stable-125a8390995df1a350e9e16e6da11d010e1e7f76.tar.gz
linux-stable-125a8390995df1a350e9e16e6da11d010e1e7f76.tar.bz2
linux-stable-125a8390995df1a350e9e16e6da11d010e1e7f76.zip
spi: axi-spi-engine: implement xfer->cs_change_delay
This adds handling of xfer->cs_change_delay to the AXI SPI Engine driver. Signed-off-by: David Lechner <dlechner@baylibre.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-6-063672323fce@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-axi-spi-engine.c4
1 files changed, 4 insertions, 0 deletions
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);
}