summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2026-01-09 20:18:00 +0300
committerMark Brown <broonie@kernel.org>2026-01-12 15:40:29 +0300
commitaf4b2dc4810380a469dcd7508923b70892c2996a (patch)
treec8d8243d6612cb59b2c1d15277cc0e742f194248 /include/linux
parent0196932f539e306e122b6edf24c9f5e30d1f73ee (diff)
downloadlinux-af4b2dc4810380a469dcd7508923b70892c2996a.tar.xz
spi: spi-mem: Create a repeated address operation
In octal DTR mode addresses may either be long enough to cover at least two bytes (in which case the existing macro works), or otherwise for single byte addresses, the byte must also be duplicated and sent twice: on each front of the clock. Create a macro for this common case. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260109-winbond-v6-17-rc1-oddr-v2-2-1fff6a2ddb80@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi-mem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index 81c9c7e793b6..e4db0924898c 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -43,6 +43,14 @@
.dtr = true, \
}
+#define SPI_MEM_DTR_OP_RPT_ADDR(__val, __buswidth) \
+ { \
+ .nbytes = 2, \
+ .val = __val | __val << 8, \
+ .buswidth = __buswidth, \
+ .dtr = true, \
+ }
+
#define SPI_MEM_OP_NO_ADDR { }
#define SPI_MEM_OP_DUMMY(__nbytes, __buswidth) \