mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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>
This commit is contained in:
parent
1ebbefb73c
commit
28c3edc43c
|
|
@ -51,6 +51,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) \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user