[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <486f703b-fc8a-ccc1-134d-a908df798b2e@cogentembedded.com>
Date: Tue, 23 May 2017 09:02:27 +0300
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Stefan Agner <stefan@...er.ch>,
Mark Rutland <mark.rutland@....com>,
devicetree@...r.kernel.org, Jeff White <Jeff.White@....aero>,
Russell King <linux@...linux.org.uk>,
linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Vladimir Barinov <vladimir.barinov@...entembedded.com>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
Chris Healy <Chris.Healy@....aero>
Subject: Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: add hi8435 device
>> However, hi8435 driver historically was coded using inverted values
>> passed to gpiolib calls. And there are setups in the wild with device
>> trees containing GPIO_ACTIVE_HIGH that I'd prefer not breaking.
>>
>> To solve, I submitted a patch on hi8435 driver that changes to _raw()
>> gpio calls (thus making it independent of what is written in device
>> tree), and want [future] device trees not to contain explicitly written
>> gpio polarity.
>
> So maybe add another #define, GPIO_ACTIVE_IGNORED, to make it clear
> that it does not matter what value you put there, it is ignored.
"Crap origin" here is that in vast majority of cases, polarity is
per-chip, not per-chip-use, knowledge. And proper location for per-chip
knowledge is chip's driver. Moving this knowledge to per-chip-use
location in device trees only provides a source for errors, with little
gain.
Vladimir Barinov mentions possibility that signal can be inverted by
board between gpio provider and chip's pin ... but do we have at least
one practical case of this? And if we even do, it's quite uncommon, and
something special should be required in device tree for these special
cases and not for "normal" cases.
Powered by blists - more mailing lists