From: Mark Brown <broonie@kernel.org>
To: Bert Vermeulen <bert@biot.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
linux-spi <linux-spi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] spi: rb4xx: Fix set_cs logic.
Date: Tue, 21 Apr 2015 12:09:58 +0100 [thread overview]
Message-ID: <20150421110958.GH22845@sirena.org.uk> (raw)
In-Reply-To: <55362E02.3070309@biot.com>
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
On Tue, Apr 21, 2015 at 01:01:22PM +0200, Bert Vermeulen wrote:
> On 04/21/2015 11:46 AM, Geert Uytterhoeven wrote:
> > On Mon, Apr 20, 2015 at 10:37 PM, Mark Brown <broonie@kernel.org> wrote:
> >> No, the enable parameter *should* refer to chip select assertion (see
> >> how we handle GPIO chip selects). However it's possible that this
> >> device has an inverted chip select and should be registered with the
> >> SPI_CS_HIGH flag?
> > It's logic level:
> > * @set_cs: set the logic level of the chip select line. May be called
> > * from interrupt context.
> Right It's the implementation which doesn't really make sense IMHO: it
> always inverts the "enable" parameter (unless SPI_CS_HIGH is set), in
> keeping with the default active-low.
The default chip select is active low so an enebled chip select is low.
> So the docs are right, but "enable" doesn't match what it does. Chip select
> assertion would be a better API here. Is it worth fixing?
I suspect it's going to cause more breakage than it fixes with people
upstreaming things to change the sense of the paramter betwen kernel
versions - renaming the parameter to be clearer is probably about as
good as it gets.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-04-21 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 13:53 Bert Vermeulen
2015-04-20 20:37 ` Mark Brown
2015-04-21 9:46 ` Geert Uytterhoeven
2015-04-21 11:01 ` Bert Vermeulen
2015-04-21 11:09 ` Mark Brown [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=20150421110958.GH22845@sirena.org.uk \
--to=broonie@kernel.org \
--cc=bert@biot.com \
--cc=geert@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
all inboxes | Powered by JetHome®