lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFlpYff6I5V6JiH1@google.com>
Date:   Mon, 8 May 2023 14:28:01 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Aaro Koskinen <aaro.koskinen@....fi>,
        Janusz Krzysztofik <jmkrzyszt@...il.com>,
        Tony Lindgren <tony@...mide.com>,
        Russell King <linux@...linux.org.uk>,
        Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Mark Brown <broonie@...nel.org>,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        Andreas Kemnade <andreas@...nade.info>,
        Helge Deller <deller@....de>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
        linux-input@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-mmc@...r.kernel.org
Subject: Re: [PATCH v3 1/3] Input: ads7846 - Convert to use software nodes

On Mon, May 08, 2023 at 11:23:44PM +0200, Linus Walleij wrote:
> On Fri, May 5, 2023 at 8:08 PM Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> 
> > > -     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

> 
> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ