Re: [RFC/PATCH] backlight: hx8357: prepare to conversion to gpiod API

From: Daniel Thompson
Date: Tue Oct 04 2022 - 08:59:06 EST

On Tue, Oct 04, 2022 at 11:02:06AM +0200, Linus Walleij wrote:
> On Wed, Sep 28, 2022 at 12:32 AM Dmitry Torokhov
> <dmitry.torokhov@xxxxxxxxx> wrote:
> > Properties describing GPIOs should be named as "<property>-gpios" or
> > "<property>-gpio", and that is what gpiod API expects, however the
> > driver uses non-standard "gpios-reset" name. Let's adjust this, and also
> > note that the reset line is active low as that is also important to
> > gpiod API.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> I think the gods of Open Firmware will try to punish you for such
> incompatible changes. But I have long since renounced them.
> > Another option is to add another quirk into gpiolib-of.c, but we
> > may end up with a ton of them once we convert everything away from
> > of_get_named_gpio() to gpiod API, so I'd prefer not doing that.
> We need to know if i.MX is shipping device trees stored in flash,
> or if they bundle it with the kernel.

This part is frequently found in add-on boards so it's not purely an
i.MX-only question.

> In the former case, you have to add quirks, in the latter case this
> patch is fine.
> Sascha, what does the Freescale maintainer say?

IMHO for not-in-the-soc devices like this the presence of in-kernel DTs
isn't enough to make a decision. What is needed is a degree of
due-diligence to show that there are no obvious out-of-kernel users.

To be honest, I suspect the due-diligence checks will probably yield a
green light for this one. Most of the tutorials for the popular HX8357
devices, show how to run python code in userspace that sends raw SPI
commands. That sucks but at least it doesn't raise any concerns about
bindings maintenance.