* Using Pull-up resistors on gpio-pca953x expander
@ 2020-01-15 20:25 Adam Ford
2020-01-16 9:42 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2020-01-15 20:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Linux Kernel Mailing List,
Thomas Petazzoni
The pca953x can support pull-up resistors, and I have a pcal6416 that
I'd like to enable them.
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;
I don't know enough about the API to know how to enable this. Can
someone give me some pointers?
Would you entertain my adding some device tree hooks to enable them?
adam
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using Pull-up resistors on gpio-pca953x expander
2020-01-15 20:25 Using Pull-up resistors on gpio-pca953x expander Adam Ford
@ 2020-01-16 9:42 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2020-01-16 9:42 UTC (permalink / raw)
To: Adam Ford, open list:GPIO SUBSYSTEM
Cc: Bartosz Golaszewski, Linux Kernel Mailing List, Thomas Petazzoni
On Wed, Jan 15, 2020 at 9:26 PM Adam Ford <aford173@gmail.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-16 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 20:25 Using Pull-up resistors on gpio-pca953x expander Adam Ford
2020-01-16 9:42 ` Linus Walleij
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).