mbox series

[0/4] Proposal to support pull-up/pull-down GPIO configuration

Message ID 20190103164102.31437-1-thomas.petazzoni@bootlin.com
Headers show
Series Proposal to support pull-up/pull-down GPIO configuration | expand

Message

Thomas Petazzoni Jan. 3, 2019, 4:40 p.m. UTC
Hello,

As we started discussing in [1], it would be useful to have a way to
configure pull-up/pull-down resistors for simple GPIO controllers that
don't have any pinmuxing capability, and therefore no interaction with
the pinctrl subsystem.

This set of patches implements what I understood of Linus option (2),
i.e extend the ->set_config() callback, and provide additional flags
that can be used in the Device Tree: GPIO_PULL_UP and GPIO_PULL_DOWN.

Let me know what you think about this proposal.

Thanks for your feedback.

Thomas

[1] https://marc.info/?l=linux-gpio&m=154491873506701&w=2

Thomas Petazzoni (4):
  dt-bindings: gpio: document the new pull-up/pull-down flags
  gpio: rename gpio_set_drive_single_ended() to gpio_set_config()
  gpio: add core support for pull-up/pull-down configuration
  gpio: pca953x: add ->set_config implementation

 .../devicetree/bindings/gpio/gpio.txt         |  4 ++
 drivers/gpio/gpio-pca953x.c                   | 59 ++++++++++++++++++-
 drivers/gpio/gpiolib-of.c                     |  5 ++
 drivers/gpio/gpiolib.c                        | 40 ++++++++-----
 drivers/gpio/gpiolib.h                        |  2 +
 include/dt-bindings/gpio/gpio.h               |  6 ++
 include/linux/gpio/machine.h                  |  2 +
 include/linux/of_gpio.h                       |  2 +
 8 files changed, 104 insertions(+), 16 deletions(-)