summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Binacchi <[email protected]>2026-02-25 17:16:53 +0100
committerPatrice Chotard <[email protected]>2026-04-30 08:01:11 +0200
commitfa1801abc7163188b70e3eaf1a04d2fc4bcfc228 (patch)
tree1ad910c0d66c49ff8dc4abb28892493fb52ff090
parent7b879ddbc5644fa7a03e16e773054f96819948e7 (diff)
spi: sandbox_spi: support wordlen setup
The driver currently ignores the word length configuration. Implement the set_wordlen operation to store and track the current word length. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Simon Glass <[email protected]>
-rw-r--r--drivers/spi/sandbox_spi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 4cc016138b1..7c237ac8d37 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -61,6 +61,15 @@ uint sandbox_spi_get_mode(struct udevice *dev)
return priv->mode;
}
+static int sandbox_spi_set_wordlen(struct udevice *dev, unsigned int wordlen)
+{
+ struct spi_slave *slave = dev_get_parent_priv(dev);
+
+ slave->wordlen = wordlen;
+
+ return 0;
+}
+
static int sandbox_spi_xfer(struct udevice *slave, unsigned int bitlen,
const void *dout, void *din, unsigned long flags)
{
@@ -158,6 +167,7 @@ static const struct dm_spi_ops sandbox_spi_ops = {
.set_mode = sandbox_spi_set_mode,
.cs_info = sandbox_cs_info,
.get_mmap = sandbox_spi_get_mmap,
+ .set_wordlen = sandbox_spi_set_wordlen,
};
static const struct udevice_id sandbox_spi_ids[] = {