Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4189a728 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown
Browse files

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: default avatarGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c2e78c34
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
	}
@@ -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);
}