lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Dec 2020 13:18:10 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Sven Van Asbroeck <thesven73@...il.com>
Cc:     "H. Nikolaus Schaller" <hns@...delico.com>,
        Rob Herring <robh+dt@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        linux-gpio@...r.kernel.org,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>, kernel@...a-handheld.com,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Lukas Wunner <lukas@...ner.de>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Andreas Kemnade <andreas@...nade.info>
Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high
 and gpio descriptors

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@...delico.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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ