summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-axi-spi-engine.c
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2023-12-04 18:33:32 +0100
committerMark Brown <broonie@kernel.org>2023-12-06 15:19:34 +0100
commit125a8390995df1a350e9e16e6da11d010e1e7f76 (patch)
tree3ce2bcde857be344b7187ec051fddaaa655bcbaf /drivers/spi/spi-axi-spi-engine.c
parentspi: axi-spi-engine: remove xfer arg from spi_engine_gen_sleep() (diff)
downloadlinux-125a8390995df1a350e9e16e6da11d010e1e7f76.tar.xz
linux-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/spi-axi-spi-engine.c')
-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);
}