From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Marek Vasut <marek.vasut@gmail.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Marek Vasut <marek.vasut+renesas@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Jan Kotas <jank@cadence.com>, Mark Brown <broonie@kernel.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH] gpio: of: Apply regulator-gpio quirk only to enable-gpios
Date: Wed, 20 Feb 2019 11:19:58 +0100 [thread overview]
Message-ID: <20190220101958.GA7498@ulmo> (raw)
In-Reply-To: <CACRpkdb6g4fd2bXg81p1+iQ4Vgm0d+Z3nW38qy9D+romM0aj1g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]
On Wed, Feb 20, 2019 at 10:01:50AM +0100, Linus Walleij wrote:
> On Tue, Feb 19, 2019 at 5:30 PM Marek Vasut <marek.vasut@gmail.com> wrote:
>
> > Handling broken DTs only adds to the complexity, but I think this cannot
> > be helped, since those DTs can be stored in some ROM.
>
> I agree, but if the broken DT needs to be supported going forward
> I would like it to be quite explicit, so that the code down in
> gpiolib-of.c does this:
>
> /*
> * Comment about this machine
> */
> if (of_machine_is_compatible("nvidia,problematic-board") {
> /* Quirk for this specific DT for this machine*/
> }
>
> This makes the standard behavior clear and avoids the risk
> of applying hairy machine-specific quirks to any other machine,
> but even more importantly it makes it easy for people reading
> the code to see what is going on and why.
At the risk of repeating myself: the device tree bindings for regulator-
fixed are very clear: any flags in the specifier are ignored and the
polarity of the GPIO is determined exclusively by the enable-active-high
property.
This means that, contrary to what I said earlier, the Jetson TX1 device
tree is not actually buggy. Is it confusing and inconsistent? Yes it is.
But it was never wrong according to the bindings.
The commit that you merged broke the ABI set forth in the bindings by
not applying the quirks necessary to adhere to the bindings for these
fixed regulators. It was supposed to only avoid the quirks for GPIO
regulators, which are an entirely different thing.
Given the above, I don't think adding the quirk for a specific machine
is acceptable. There could be any number of device trees that rely on
the literal interpretation of the device tree bindings and they would
all remain broken if we added a quirk only for Jetson TX1.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-02-20 10:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 13:46 [PATCH] gpio: of: Apply regulator-gpio quirk only to enable-gpios marek.vasut
2019-02-16 14:04 ` Wolfram Sang
2019-02-16 14:06 ` Marek Vasut
2019-02-16 14:47 ` Wolfram Sang
2019-02-16 15:02 ` Marek Vasut
2019-02-17 21:21 ` Linus Walleij
2019-02-17 21:58 ` Marek Vasut
2019-02-19 15:18 ` Thierry Reding
2019-02-19 15:25 ` Marek Vasut
2019-02-19 16:08 ` Thierry Reding
2019-02-19 16:30 ` Marek Vasut
2019-02-19 17:05 ` Thierry Reding
2019-02-19 17:22 ` Marek Vasut
2019-02-20 9:01 ` Linus Walleij
2019-02-20 10:19 ` Thierry Reding [this message]
2019-02-20 9:07 ` Linus Walleij
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=20190220101958.GA7498@ulmo \
--to=thierry.reding@gmail.com \
--cc=broonie@kernel.org \
--cc=geert+renesas@glider.be \
--cc=jank@cadence.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=marek.vasut@gmail.com \
--cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.