Skip to content

Commit

Permalink
spi: spidev_fdx: Add support for Dual/Quad SPI Transfers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Feb 27, 2014
1 parent c2e78c3 commit 4189a72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Documentation/spi/spidev_fdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ static void do_msg(int fd, int len)

static void dumpstat(const char *name, int fd)
{
__u8 mode, lsb, bits;
__u32 speed;
__u8 lsb, bits;
__u32 mode, speed;

if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) {
if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) {
perror("SPI rd_mode");
return;
}
Expand All @@ -98,7 +98,7 @@ static void dumpstat(const char *name, int fd)
return;
}

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

Expand Down

0 comments on commit 4189a72

Please sign in to comment.