Skip to content

Commit af4b2dc

Browse files
miquelraynalbroonie
authored andcommitted
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>
1 parent 0196932 commit af4b2dc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

include/linux/spi/spi-mem.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
.dtr = true, \
4444
}
4545

46+
#define SPI_MEM_DTR_OP_RPT_ADDR(__val, __buswidth) \
47+
{ \
48+
.nbytes = 2, \
49+
.val = __val | __val << 8, \
50+
.buswidth = __buswidth, \
51+
.dtr = true, \
52+
}
53+
4654
#define SPI_MEM_OP_NO_ADDR { }
4755

4856
#define SPI_MEM_OP_DUMMY(__nbytes, __buswidth) \

0 commit comments

Comments
 (0)