[PATCH v3 00/10] Add pinctrl support for the AAEON UP board FPGA

Thomas Richard
2025-04-16T14:08:14Z

This is the third version of this series (rebased on v6.15-rc2).

The gpiolib part has been reworked, the gpiochip_add_pin_range() was
renamed to gpiochip_add_pin_range_with_pins() and a new pins parameter was
addded. Two stubs were created to add consecutive or sparse pin range.

For the forwarder library, a namespace was added and patches were splitted
to more simpler changes.

In the pinctrl core, the function devm_pinctrl_register_mappings() was
created.

No big changes in the upboard pinctrl driver, only few fixes and
improvements.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
Changes in v3:
- pinctrl: add devm_pinctrl_register_mappings()
- gpiolib: rename gpiochip_add_pin_range() to
gpiochip_add_pin_range_with_pins() and add pins parameter
- gpiolib: add stubs gpiochip_add_pin_range() and
gpiochip_add_sparse_pin_range()
- aggregator: split to more simpler patches
- aggregator: add a namespace for the forwarder library
- aggregator: rename header file to forwarder.h
- aggregator: add some missing headers and declaration in forwarder.h
- aggregator: forwarder.h provides consumer.h and driver.h
- aggregator: fix error code returned by gpio_fwd_request()
- pinctrl-upboard: fix order of header files
- pinctrl-upboard: fix some nitpicks
- pinctrl-upboard: rework macros to define pin groups
- pinctrl-upboard: add missing container_of.h and err.h header files
- pinctrl-upboard: handle correctly pointer returned by dmi_first_match()
- pinctrl-upboard: use devm_pinctrl_register_mappings()
- pinctrl-upboard: import GPIO_FORWARDER namespace
- Link to v2: https://lore.kernel.org/r/20250317-aaeon-up-board-pinctrl-support-v2-0-36126e30aa62@bootlin.com

Changes in v2:
- mfd: removed driver (already merged)
- led: removed driver (already merged)
- gpio-aggregator: refactor code to create a gpio-fwd library
- pinctrl: refactor gpio part to use the gpio-fwd library
- pinctrl: add pinctrl mappings for each board

---
Thomas Richard (10):
gpiolib: add support to register sparse pin range
pinctrl: core: add devm_pinctrl_register_mappings()
gpio: aggregator: move GPIO forwarder allocation in a dedicated function
gpio: aggregator: refactor the code to add GPIO desc in the forwarder
gpio: aggregator: refactor the forwarder registration part
gpio: aggregator: update gpiochip_fwd_setup_delay_line() parameters
gpio: aggregator: export symbols of the GPIO forwarder library
gpio: aggregator: handle runtime registration of gpio_desc in gpiochip_fwd
gpio: aggregator: add possibility to attach data to the forwarder
pinctrl: Add pin controller driver for AAEON UP boards

drivers/gpio/gpio-aggregator.c | 221 +++++---
drivers/gpio/gpiolib.c | 29 +-
drivers/pinctrl/Kconfig | 18 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/core.c | 37 ++
drivers/pinctrl/pinctrl-upboard.c | 1071 +++++++++++++++++++++++++++++++++++++
include/linux/gpio/driver.h | 51 +-
include/linux/gpio/forwarder.h | 63 +++
include/linux/pinctrl/machine.h | 10 +
9 files changed, 1408 insertions(+), 93 deletions(-)
---
base-commit: 8a834b0ac9ceb354a6e0b8cf5b363edca8221bdd
change-id: 20240930-aaeon-up-board-pinctrl-support-98fa4a030490

Best regards,
--
Thomas Richard <thomas.richard@bootlin.com>