diff mbox series

[4/5] spi: softspi: Support setting wordlen

Message ID 20240614-mipi_dbi-v1-4-946eb82f8533@jookia.org
State Under Review
Delegated to: Anatolij Gustschin
Headers show
Series video: add support for MIPI DBI interface | expand

Commit Message

John Watts June 14, 2024, 12:18 p.m. UTC
The bit-banging soft SPI driver supports any word length, so just
blindly return support for all of them.

Signed-off-by: John Watts <contact@jookia.org>
---
 drivers/spi/soft_spi.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index 0fa14339bd..4f2161f0bf 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -204,6 +204,12 @@  static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen,
 	return 0;
 }
 
+static int soft_spi_set_wordlen(struct udevice *dev, unsigned int wordlen)
+{
+	/* Support any wordlen as this driver clock out bits individually. */
+	return 0;
+}
+
 static int soft_spi_set_speed(struct udevice *dev, unsigned int speed)
 {
 	/* Ignore any speed settings. Speed is implemented via "spi-delay-us" */
@@ -223,6 +229,7 @@  static const struct dm_spi_ops soft_spi_ops = {
 	.claim_bus	= soft_spi_claim_bus,
 	.release_bus	= soft_spi_release_bus,
 	.xfer		= soft_spi_xfer,
+	.set_wordlen    = soft_spi_set_wordlen,
 	.set_speed	= soft_spi_set_speed,
 	.set_mode	= soft_spi_set_mode,
 };