linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Subject: [PATCH v2 4/4] spi: spidev_fdx: Add support for Dual/Quad SPI Transfers
Date: Tue, 25 Feb 2014 11:40:19 +0100	[thread overview]
Message-ID: <1393324819-3810-4-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1393324819-3810-1-git-send-email-geert@linux-m68k.org>

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Use SPI_IOC_RD_MODE32 to print the full SPI mode, now in hex.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
v2:
  - New

 Documentation/spi/spidev_fdx.c |    8 ++++----
 1 file 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)
 
 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);
 }
 
-- 
1.7.9.5

  parent reply	other threads:[~2014-02-25 10:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 10:40 [PATCH v2 1/4] spi: spidev: Restore all SPI mode flags on ioctl failure Geert Uytterhoeven
2014-02-25 10:40 ` [PATCH v2 2/4] spi: spidev: Add support for Dual/Quad SPI Transfers Geert Uytterhoeven
2014-02-27  4:51   ` Mark Brown
2014-02-25 10:40 ` [PATCH v2 3/4] spi: spidev_test: " Geert Uytterhoeven
2014-02-27  4:51   ` Mark Brown
2014-02-25 10:40 ` Geert Uytterhoeven [this message]
     [not found]   ` <1393324819-3810-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-02-27  4:52     ` [PATCH v2 4/4] spi: spidev_fdx: " Mark Brown
     [not found] ` <1393324819-3810-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-02-27  4:50   ` [PATCH v2 1/4] spi: spidev: Restore all SPI mode flags on ioctl failure Mark Brown
     [not found]     ` <20140227045032.GN9383-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-27  8:59       ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393324819-3810-4-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).