mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: "H. Nikolaus Schaller" <hns@goldelico.com>,
	Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	linux-gpio@vger.kernel.org,
	devicetree <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>,
	kernel@pyra-handheld.com,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Lukas Wunner <lukas@wunner.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Andreas Kemnade <andreas@kemnade.info>
Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors
Date: Fri, 11 Dec 2020 13:18:10 +0000	[thread overview]
Message-ID: <20201211131810.GB4929@sirena.org.uk> (raw)
In-Reply-To: <CAGngYiVKHoXPGxmScCnb-R6xoo9GNw5pG8V8Cpyk3meoJbskiw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

On Wed, Dec 09, 2020 at 12:36:40PM -0500, Sven Van Asbroeck wrote:
> On Wed, Dec 9, 2020 at 4:57 AM H. Nikolaus Schaller <hns@goldelico.com> wrote:

> > +      device node     | cs-gpio       | CS pin state active | Note
> > +      ================+===============+=====================+=====
> > +      spi-cs-high     | -             | H                   |
> > +      -               | -             | L                   |
> > +      spi-cs-high     | ACTIVE_HIGH   | H                   |
> > +      -               | ACTIVE_HIGH   | L                   | 1
> > +      spi-cs-high     | ACTIVE_LOW    | H                   | 2
> > +      -               | ACTIVE_LOW    | L                   |
> > +

> Doesn't this table simply say:
> - specify   'spi-cs-high' for an active-high chip select
> - leave out 'spi-cs-high' for an active-low  chip select
> - the gpio active high/active low consumer flags are ignored
> ?

It seems to, yes.

> If so, then I would simply document it that way.
> Simple is beautiful.

Yeah, it'd definitely be easier to read and clearer what people should
actually do.  As Linus said it'd also be a good idea to explicitly say
that this is not great design or particularly intentional since it could
be pretty confusing for someone trying to understand why the bindings
are the way they are.

I'm going to apply this anyway to make sure we get this documentated but
some incremental improvements along these lines would be good.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-12-11 13:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  9:57 H. Nikolaus Schaller
2020-12-09 17:36 ` Sven Van Asbroeck
2020-12-09 18:13   ` H. Nikolaus Schaller
2020-12-09 19:04     ` Sven Van Asbroeck
2020-12-09 19:31       ` H. Nikolaus Schaller
2020-12-09 20:01       ` Andreas Kemnade
2020-12-09 20:05         ` H. Nikolaus Schaller
2020-12-09 21:28           ` Sven Van Asbroeck
2020-12-09 22:04             ` H. Nikolaus Schaller
2020-12-11 13:18   ` Mark Brown [this message]
2020-12-11 13:26     ` Sven Van Asbroeck
2020-12-11  8:12 ` Linus Walleij
2020-12-11 17:51 ` Mark Brown

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=20201211131810.GB4929@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andreas@kemnade.info \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=kernel@pyra-handheld.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=thesven73@gmail.com \
    /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®