Skip to content

Commit 4189a72

Browse files
Geert Uytterhoevenbroonie
authored andcommitted
spi: spidev_fdx: Add support for Dual/Quad SPI Transfers
Use SPI_IOC_RD_MODE32 to print the full SPI mode, now in hex. Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent c2e78c3 commit 4189a72

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Documentation/spi/spidev_fdx.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ static void do_msg(int fd, int len)
7878

7979
static void dumpstat(const char *name, int fd)
8080
{
81-
__u8 mode, lsb, bits;
82-
__u32 speed;
81+
__u8 lsb, bits;
82+
__u32 mode, speed;
8383

84-
if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) {
84+
if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) {
8585
perror("SPI rd_mode");
8686
return;
8787
}
@@ -98,7 +98,7 @@ static void dumpstat(const char *name, int fd)
9898
return;
9999
}
100100

101-
printf("%s: spi mode %d, %d bits %sper word, %d Hz max\n",
101+
printf("%s: spi mode 0x%x, %d bits %sper word, %d Hz max\n",
102102
name, mode, bits, lsb ? "(lsb first) " : "", speed);
103103
}
104104

0 commit comments

Comments
 (0)