aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>2014-02-25 05:40:19 -0500
committerMark Brown <broonie@linaro.org>2014-02-26 23:51:29 -0500
commit4189a728ae26832edfabca300313e7fef2818d6f (patch)
tree948e6cd7cf181fbb91dc2c016ac2b46b61490ace /Documentation/spi
parentc2e78c34ef0bf4fa860b5fffc99c769d6ddaf52d (diff)
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>
Diffstat (limited to 'Documentation/spi')
-rw-r--r--Documentation/spi/spidev_fdx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/spi/spidev_fdx.c b/Documentation/spi/spidev_fdx.c
index 36ec0774ca0b..0ea3e51292fc 100644
--- a/Documentation/spi/spidev_fdx.c
+++ b/Documentation/spi/spidev_fdx.c
@@ -78,10 +78,10 @@ static void do_msg(int fd, int len)
78 78
79static void dumpstat(const char *name, int fd) 79static void dumpstat(const char *name, int fd)
80{ 80{
81 __u8 mode, lsb, bits; 81 __u8 lsb, bits;
82 __u32 speed; 82 __u32 mode, speed;
83 83
84 if (ioctl(fd, SPI_IOC_RD_MODE, &mode) < 0) { 84 if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) {
85 perror("SPI rd_mode"); 85 perror("SPI rd_mode");
86 return; 86 return;
87 } 87 }
@@ -98,7 +98,7 @@ static void dumpstat(const char *name, int fd)
98 return; 98 return;
99 } 99 }
100 100
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",
102 name, mode, bits, lsb ? "(lsb first) " : "", speed); 102 name, mode, bits, lsb ? "(lsb first) " : "", speed);
103} 103}
104 104