From: Daniel Thompson <daniel.thompson@linaro.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>, Lee Jones <lee@kernel.org>,
Jingoo Han <jingoohan1@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [RFC/PATCH] backlight: hx8357: prepare to conversion to gpiod API
Date: Thu, 13 Oct 2022 13:43:52 +0100 [thread overview]
Message-ID: <Y0gICNqed+55mwuX@maple.lan> (raw)
In-Reply-To: <Y0ck3jopU+Z74xqn@google.com>
On Wed, Oct 12, 2022 at 01:34:38PM -0700, Dmitry Torokhov wrote:
> On Mon, Oct 10, 2022 at 10:36:00PM +0200, Linus Walleij wrote:
> > On Thu, Oct 6, 2022 at 12:05 PM Daniel Thompson
> > <daniel.thompson@linaro.org> wrote:
> > > On Thu, Oct 06, 2022 at 11:03:15AM +0200, Linus Walleij wrote:
> > > > On Tue, Oct 4, 2022 at 10:35 PM Dmitry Torokhov
> > > > <dmitry.torokhov@gmail.com> wrote:
> > > >
> > > > > > Dmitry, could you fix this? Just patch away in gpiolib-of.c.
> > > > >
> > > > > Sure, I'll add a few quirks. I wonder what is the best way to merge
> > > > > this? I can create a bunch of IBs to be pulled, or I can send quirks to
> > > > > you/Bartosz and once they land send the patches to drivers...
> > > >
> > > > When I did it I was sufficiently convinced that I was the only one patching
> > > > the quirks in gpiolib-of.c that merge window so I just included it as
> > > > a hunk in the driver patch. If there will be some more patches to that
> > > > file I guess some separate patch(es) for gpiolib-of.c is needed, maybe
> > > > an immutable branch for those if it becomes a lot.
> > >
> > > Are renames likely to be a common quirk on the road to libgpiod
> > > conversion?
> > >
> > > I admit I sort of expected it to be common enough that there would be
> > > one rename quirk in the code supported by an alphabetized string table.
> > > Such a table would certainly still provoke troublesome merges but ones
> > > that are trivially resolved.
> >
> > Dmitry added a table of sorts, the problems are usually a bit unique
> > for each instance of nonstandard DT GPIO bindings, that's why I
> > mostly solved it with open coding in gpiolib-of.c.
>
> OK, so I sent out the patch adding "reset-gpios" -> "gpios-reset"
> translation quirk to keep compatibility with the legacy names, but
> we still need to figure out what to do with incorrect line polarity
> in current DTses in tree. Unlike with names we have no indication
> if out of tree DTSes specify correct polarity or not, so we can't
> reasonably come up with workarounds that are guaranteed to work for
> everyone. I see several options:
>
> 1 the driver could continue ignoring line polarity specified in DTS
> (and use gpiod_set_value_raw()) and hope that they all/will be
> wired in the same way?
>
> 2 we could fix up in-kernel DTSes, allow flexibility of connection
> in new designs and respect polarity specified in out of tree DTSes,
> but accept that there can be breakages with old DTSes not contributed
> to the mainline or DTSes that were "cached" from an older kernel
> release
>
> 3 add another quirk forcing "active low" polarity for the legacy
> "gpios-reset" name, which will allow us respecting polarity in
> new "reset-gpios" name.
I don't think they is any point in having a rename if legacy DTs break
anyway! Thus if there is a rename then there should also be an active low
quirk applied when the old name is used.
Daniel.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-10-13 12:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 22:32 [RFC/PATCH] backlight: hx8357: prepare to conversion to gpiod API Dmitry Torokhov
2022-09-28 11:00 ` Daniel Thompson
2022-09-28 18:33 ` Dmitry Torokhov
2022-10-03 13:32 ` Daniel Thompson
2022-10-04 9:02 ` Linus Walleij
2022-10-04 12:54 ` Daniel Thompson
2022-10-04 19:50 ` Linus Walleij
2022-10-04 20:35 ` Dmitry Torokhov
2022-10-06 9:03 ` Linus Walleij
2022-10-06 10:04 ` Daniel Thompson
2022-10-10 20:36 ` Linus Walleij
2022-10-12 20:34 ` Dmitry Torokhov
2022-10-13 12:43 ` Daniel Thompson [this message]
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=Y0gICNqed+55mwuX@maple.lan \
--to=daniel.thompson@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).