Skip to content

Commit 7bb6440

Browse files
zhangqingmybroonie
authored andcommitted
spi: tools: Add macro definitions to fix build errors
Add SPI_TX_OCTAL and SPI_RX_OCTAL to fix the following build errors: CC spidev_test.o spidev_test.c: In function ‘transfer’: spidev_test.c:131:13: error: ‘SPI_TX_OCTAL’ undeclared (first use in this function) if (mode & SPI_TX_OCTAL) ^ spidev_test.c:131:13: note: each undeclared identifier is reported only once for each function it appears in spidev_test.c:137:13: error: ‘SPI_RX_OCTAL’ undeclared (first use in this function) if (mode & SPI_RX_OCTAL) ^ spidev_test.c: In function ‘parse_opts’: spidev_test.c:290:12: error: ‘SPI_TX_OCTAL’ undeclared (first use in this function) mode |= SPI_TX_OCTAL; ^ spidev_test.c:308:12: error: ‘SPI_RX_OCTAL’ undeclared (first use in this function) mode |= SPI_RX_OCTAL; ^ LD spidev_test-in.o ld: cannot find spidev_test.o: No such file or directory Additionally, maybe SPI_CS_WORD and SPI_3WIRE_HIZ will be used in the future, so add them too. Fixes: 896fa73 ("spi: spidev_test: Add support for Octal mode data transfers") Signed-off-by: Qing Zhang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent bd20779 commit 7bb6440

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/uapi/linux/spi/spidev.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
#define SPI_TX_QUAD 0x200
4949
#define SPI_RX_DUAL 0x400
5050
#define SPI_RX_QUAD 0x800
51+
#define SPI_CS_WORD 0x1000
52+
#define SPI_TX_OCTAL 0x2000
53+
#define SPI_RX_OCTAL 0x4000
54+
#define SPI_3WIRE_HIZ 0x8000
5155

5256
/*---------------------------------------------------------------------------*/
5357

0 commit comments

Comments
 (0)