mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 00/11] gpiolib: add support for OF GPIO configuration binding
@ 2024-08-09 14:23 Ahmad Fatoum
  2024-08-09 14:23 ` [PATCH 01/11] gpio: make gpio.h header self-contained Ahmad Fatoum
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ahmad Fatoum @ 2024-08-09 14:23 UTC (permalink / raw)
  To: barebox

So far, GPIO bias configuration was done exclusively by pinctrl drivers.
All barebox pinctrl drivers work by consuming a device tree node with
a binding that differs from driver to driver and then applying the
configuration described within.

Neither GPIO or pinctrl node have any insight on what in particular is
being configured.

This is problematic when wanting to support following device tree
binding, which is so far being ignored:

  gpios = <&gpioe 7 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>;

This series enables support for this binding for gpio-keys on STM32
platforms. More support will follow in future when providers are
extended to support the gpio_ops::set_config operation and consumers are
switched to use the GPIO descriptor API.

Ahmad Fatoum (11):
  gpio: make gpio.h header self-contained
  gpiolib: permit GPIO drivers to implement struct gpio_ops::set_config
  pinctrl: stm32: implement generic struct gpio_ops::set_config
  gpiolib: turn request/active_low into bit flags
  gpiolib: don't use GPIO number API in of_hog_gpio
  gpiolib: store all OF flags into GPIO descriptor
  gpiolib: add support for OF GPIO configuration binding
  gpiolib: use dev_gpiod_get_index device node argument throughout
  gpiolib: export function to get struct gpio_desc from index
  input: gpio_keys: switch to GPIO descriptor API
  input: gpio-keys: request with label in DT if available

 drivers/gpio/Kconfig            |  14 ++
 drivers/gpio/gpiolib.c          | 254 +++++++++++++++++++++++++-------
 drivers/input/Kconfig           |   2 +-
 drivers/input/gpio_keys.c       |  69 +++++----
 drivers/of/Kconfig              |  15 ++
 drivers/pinctrl/Kconfig         |   1 +
 drivers/pinctrl/pinctrl-stm32.c |  41 ++++++
 include/gpio.h                  |   4 +
 include/linux/gpio/consumer.h   |  19 +++
 include/of_gpio.h               |   6 +
 10 files changed, 337 insertions(+), 88 deletions(-)

-- 
2.39.2




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-08-14 11:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-09 14:23 [PATCH 00/11] gpiolib: add support for OF GPIO configuration binding Ahmad Fatoum
2024-08-09 14:23 ` [PATCH 01/11] gpio: make gpio.h header self-contained Ahmad Fatoum
2024-08-09 14:23 ` [PATCH 02/11] gpiolib: permit GPIO drivers to implement struct gpio_ops::set_config Ahmad Fatoum
2024-08-09 14:23 ` [PATCH 03/11] pinctrl: stm32: implement generic " Ahmad Fatoum
2024-08-09 14:23 ` [PATCH 04/11] gpiolib: turn request/active_low into bit flags Ahmad Fatoum
2024-08-09 14:23 ` [PATCH 05/11] gpiolib: don't use GPIO number API in of_hog_gpio Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 06/11] gpiolib: store all OF flags into GPIO descriptor Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 07/11] gpiolib: add support for OF GPIO configuration binding Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 08/11] gpiolib: use dev_gpiod_get_index device node argument throughout Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 09/11] gpiolib: export function to get struct gpio_desc from index Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 10/11] input: gpio_keys: switch to GPIO descriptor API Ahmad Fatoum
2024-08-09 14:24 ` [PATCH 11/11] input: gpio-keys: request with label in DT if available Ahmad Fatoum
2024-08-14 11:00 ` [PATCH 00/11] gpiolib: add support for OF GPIO configuration binding Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox