Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: cs_change for SPI transfers
Date: Tue, 11 Jan 2011 19:03:49 +0000	[thread overview]
Message-ID: <4D2CA995.80002@cam.ac.uk> (raw)
In-Reply-To: <4D2B1619.1010408@iis.fraunhofer.de>

On 01/10/11 14:22, Manuel Stahl wrote:
> Hi,
> 
> I think there's an error in most IIO devices that use SPI transfers.
> 
> Haavard Skinnemoen wrote:
>> The normal behaviour is:
>>   * After all transfers except the last: CS stays active
>>   * After the last transfer: CS goes inactive
>>
>> The cs_change flag is used to invert this behaviour. So for the last
>> transfer, cs_change indicates that CS should stay active after the
>> transfer (though the driver may not actually be able to do so, e.g. if
>> the message is followed by a message to a different device.)
>>
> 
> The drivers in IIO set cs_change for all transfers (including the
> last in a message), which is not what we want. I can prepare a patch
> to correct this.

Yikes.

They win for completely counter intuitive interface... I guess I can see why
they did it like that (to make 0 the default behaviour).
Clearer naming would have been nice. cs_change_non_default or something...

Please do submit a patch set for this.

Jonathan

      reply	other threads:[~2011-01-11 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 14:22 cs_change for SPI transfers Manuel Stahl
2011-01-11 19:03 ` Jonathan Cameron [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=4D2CA995.80002@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=manuel.stahl@iis.fraunhofer.de \
    /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