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] [day] [month] [year] [list]
Message-ID: <CACRpkdayE023wfdJxHDVNtSF08kqGG6kfW7vkZhnq7OpcnmuEg@mail.gmail.com>
Date:   Thu, 16 Jan 2020 10:42:08 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Adam Ford <aford173@...il.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>
Cc:     Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: Using Pull-up resistors on gpio-pca953x expander

On Wed, Jan 15, 2020 at 9:26 PM Adam Ford <aford173@...il.com> wrote:

> The pca953x can support pull-up resistors, and I have a pcal6416 that
> I'd like to enable them.

OK this is supported in the driver since
commit 15add06841a3b0b4734a72847a73c71fd09ebe52
"gpio: pca953x: add ->set_config implementation"

> Ideally, I was hoping there would be a way to add enable to the device
> tree, because the expander is connected to some buttons which are
> grounded when pressed.  Without pull-up resistors enabled, the buttons
> always appear to be pressed.
>
> Is there some way to enable them?  I see the functionality is
> available and called through gc->set_config = pca953x_gpio_set_config;
(...)
> Would you entertain my adding some device tree hooks to enable them?

Have you tried something like this in your DTS:

#include <dt-bindings/gpio/gpio.h>
(...)
gpios = <&gpio 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ