[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FCF3FDA7-7385-423F-9B30-836CBB446BF8@goldelico.com>
Date: Wed, 9 Dec 2020 20:31:55 +0100
From: "H. Nikolaus Schaller" <hns@...delico.com>
To: Sven Van Asbroeck <thesven73@...il.com>
Cc: Mark Brown <broonie@...nel.org>, 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,
Lukas Wunner <lukas@...ner.de>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Andreas Kemnade <andreas@...nade.info>,
Maxime Ripard <maxime@...no.tech>
Subject: Re: [PATCH] spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors
> Am 09.12.2020 um 20:04 schrieb Sven Van Asbroeck <thesven73@...il.com>:
>
> On Wed, Dec 9, 2020 at 1:16 PM H. Nikolaus Schaller <hns@...delico.com> wrote:
>>
>> This is also what made me wonder if that is really intended because then
>> the whole discussion about the cs-gpio-flags and inversion and the fixes
>> would not have been needed. The current code and fixes are all about
>> not ignoring the flags...
>
> The inversion you witnessed was a bug caused by spi client drivers that
The inversion we witnessed came from:
commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings"
There, I read a verbal description of the table I want to formalize
with this patch, because natural language is not as precise as the language
of logic.
This has nothing to do with driver code, which remained and remains unchanged
for long time.
>
>> Secondly, please imagine some reader of a device tree who finds
>>
>> cs-gpios = <&gpio 7 ACTIVE_LOW>;
>> spi-cs-high;
>
> That reader looks at the rules, sees that:
> - the ACTIVE_LOW is ignored,
> - presence of spi-cs-high means active-high
> and concludes this chip-select is active-high.
This misses information what the reader should do to resolve the
obviously missing beauty of the DT.
a) remove spi-cs-high;
b) change to ACTIVE_HIGH
Both appear valid in first place. But one is preferred. This is
again nowhere documented if you simplify the table.
Powered by blists - more mailing lists