Thread (12 messages) 12 messages, 3 authors, 2023-05-08

Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2023-05-08 21:28:27
Also in: dri-devel, linux-input, linux-mips, linux-mmc, linux-omap, linux-spi, lkml

On Mon, May 08, 2023 at 11:23:44PM +0200, Linus Walleij wrote:
On Fri, May 5, 2023 at 8:08 PM Dmitry Torokhov
[off-list ref] wrote:
quoted
quoted
-     return !gpio_get_value(ts->gpio_pendown);
+     return !gpiod_get_value(ts->gpio_pendown);
This needs to be

        return !gpiod_get_value_raw(ts->gpio_pendown);
There is no such function. The gpio descriptor runpath simply assumes that
device trees can be trusted.
Sorry, this was supposed to be gpiod_get_raw_value():

https://elixir.bootlin.com/linux/latest/source/drivers/gpio/gpiolib.c#L2854
quoted
I looked at various DTSes we have and they use a mix of active high and
active low annotations, so we have to go with the "raw" variant for now,
and then update to normal one once we update bad DTSes.
I just sighed and fixed all the device trees :D
Yeah, we we can land the DT fixes ahead of the driver change that would
be great. Otherwise we need a temporary application of
gpiod_get_raw_value().
Yours,
Linus Walleij
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help