linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kevyn-Alexandre Paré" <kapare-7qmld2CjetYf4mhTGKTGE9BPR1lH4CV8@public.gmane.org>
To: Elvis Dowson <elvis.dowson-ee4meeAH724@public.gmane.org>
Cc: SPI Developer Mailing List
	<spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Sending one byte transfers using SPI bus with linux-2.6.32
Date: Mon, 07 Mar 2011 20:00:34 -0500	[thread overview]
Message-ID: <1299546034.2338.70.camel@andromeda> (raw)
In-Reply-To: <1BCF7F7D-8E99-41A1-B134-9D7B478BC900-ee4meeAH724@public.gmane.org>

A simple git diff should have save us some time ;)

git diff v2.6.32 v2.6.36 -- spidev_test.c
warning: refname 'v2.6.32' is ambiguous.
diff --git a/Documentation/spi/spidev_test.c
b/Documentation/spi/spidev_test.c
index 10abd37..16feda9 100644
--- a/Documentation/spi/spidev_test.c
+++ b/Documentation/spi/spidev_test.c
@@ -58,7 +58,7 @@ static void transfer(int fd)
        };
 
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
-       if (ret == 1)
+       if (ret < 1)
                pabort("can't send spi message");
 
        for (ret = 0; ret < ARRAY_SIZE(tx); ret++) {

-- kap

On Sun, 2011-03-06 at 21:45 +0400, Elvis Dowson wrote:
> Hi,
>         The problem was in the spidev_test.c program itself, in linux-2.6.32.
> 
> After applying the following patch taken from linux-2.6.34, 1 byte transfers work.
> 
> http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.34.y.git;a=blobdiff;f=Documentation/spi/spidev_test.c;h=16feda9014692a87a4996bf51d759ab9e7500ee5;hp=10abd3773e49122aab0dfad27f7cb2c91b8d5d08;hb=95b1ed2ac7ffe3205afc6f5a20320fbdb984da92;hpb=dda04c7bcf58cb02ac796beb1cf483aa5277f2af
> 
> Elvis Dowson



------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d

      parent reply	other threads:[~2011-03-08  1:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E4CEDCEF-66BE-4C94-A27D-5088882A1E0C@mac.com>
     [not found] ` <E4CEDCEF-66BE-4C94-A27D-5088882A1E0C-ee4meeAH724@public.gmane.org>
2011-03-04 15:59   ` Sending one byte transfers using SPI bus with linux-2.6.32 Grant Likely
     [not found]     ` <7974B5C3-662C-40A9-AB44-722A84190886@mac.com>
     [not found]       ` <7974B5C3-662C-40A9-AB44-722A84190886-ee4meeAH724@public.gmane.org>
2011-03-04 19:38         ` Kevyn-Alexandre Paré
     [not found]           ` <1299268583.2338.6.camel@andromeda>
2011-03-04 19:58             ` Kevyn-Alexandre Paré
     [not found]               ` <B9012B37-7DAE-4D5D-B3F5-FFD675C89648@mac.com>
     [not found]                 ` <B9012B37-7DAE-4D5D-B3F5-FFD675C89648-ee4meeAH724@public.gmane.org>
2011-03-04 20:56                   ` Kevyn-Alexandre Paré
     [not found]                     ` <1BCF7F7D-8E99-41A1-B134-9D7B478BC900@mac.com>
     [not found]                       ` <1BCF7F7D-8E99-41A1-B134-9D7B478BC900-ee4meeAH724@public.gmane.org>
2011-03-08  1:00                         ` Kevyn-Alexandre Paré [this message]

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=1299546034.2338.70.camel@andromeda \
    --to=kapare-7qmld2cjetyf4mhtgktge9bpr1lh4cv8@public.gmane.org \
    --cc=elvis.dowson-ee4meeAH724@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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).