[GIT PULL] gpio updates for v7.1-rc1

From: Bartosz Golaszewski

Date: Fri Apr 10 2026 - 04:40:51 EST


Linus,

I'll be OoO next week and disconnected so I'm sending an early PR for the
next cycle.

For this merge window we have two new drivers: support for GPIO-signalled
ACPI events on Intel platforms and a generic GPIO-over-pinctrl driver using
the ARM SCMI protocol for controlling pins.

Several things have been reworked in GPIO core: we unduplicated GPIO hog
handling, reduced the number of SRCU locks and dereferences, improved
support for software-node-based lookup and removed more legacy code after
converting remaining users to modern alternatives.

There's also a number of driver reworks and refactoring, documentation
updates, some bug-fixes and new tests.

The merges in this PR are as follows: immutable branch provided to the
net tree with driver changes prerequisite to legacy code removal, pinctrl
changes pulled ahead of adding the SCMI GPIO driver and an immutable branch
with a high-risk GPIO core fix that was then pulled into the for-current
branch and sent for v7.0 after spending some time in linux-next with no
regressions.

Details are in the signed tag. Please consider pulling for v7.1-rc1.

Thanks,
Bartosz

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-updates-for-v7.1-rc1

for you to fetch changes up to ca13ab654064fee86d6e7c9e87d0af7789561509:

gpio: swnode: defer probe on references to unregistered software nodes (2026-04-09 15:59:30 +0200)

----------------------------------------------------------------
gpio updates for v7.1-rc1

GPIO core:
- defer probe on software node lookups when the remote software node
exists but has not been registered as a firmware node yet
- unify GPIO hog handling by moving code duplicated in OF and ACPI
modules into GPIO core and allow setting up hogs with software nodes
- allow matching GPIO controllers by secondary firmware node if matching
by primary does not succeed
- demote deferral warnings to debug level as they are quite normal when
using software nodes which don't support fw_devlink yet
- disable the legacy GPIO character device uAPI v1 supprt in Kconfig by
default
- rework several core functions in preparation for the upcoming Revocable
helper library for protecting resources against sudden removal, this
reduces the number of SRCU dereferences in GPIO core
- simplify file descriptor logic in GPIO character device code by using
FD_PREPARE()
- introduce a header defining symbols used by both GPIO consumers and
providers to avoid having to include provider-specific headers from
drivers which only consume GPIOs
- replace snprintf() with strscpy() where formatting is not required

New drivers:
- add the gpio-by-pinctrl generic driver using the ARM SCMI protocol to
control GPIOs (along with SCMI changes pulled from the pinctrl tree)
- add a driver providing support for handling of platform events via
GPIO-signalled ACPI events (used on Intel Nova Lake and later platforms)

Driver changes:
- extend the gpio-kempld driver with support for more recent models,
interrupts and setting/getting multiple values at once
- improve interrupt handling in gpio-brcmstb
- add support for multi-SoC systems in gpio-tegra186
- make sure we return correct values from the .get() callbacks in several
GPIO drivers by normalizing any values other than 0, 1 or negative error
numbers
- use flexible arrays in several drivers to reduce the number of required
memory allocations
- simplify synchronous waiting for virtual drivers to probe and remove the
dedicated, a bit overengineered helper library dev-sync-probe
- remove unneeded Kconfig dependencies on OF_GPIO in several drivers and
subsystems
- convert the two remaining users of of_get_named_gpio() to using GPIO
descriptors and remove the (no longer used) function along with the
header that declares it
- add missing includes in gpio-mmio
- shrink and simplify code in gpio-max732x by using guard(mutex)
- remove duplicated code handling the 'ngpios' property from gpio-ts4800,
it's already handled in GPIO core
- use correct variable type in gpio-aspeed
- add support for a new model in gpio-realtek-otto
- allow to specify the active-low setting of simulated hogs over the
configfs interface (in addition to existing devicetree support) in
gpio-sim

Bug fixes:
- clear the OF_POPULATED flag on hog nodes in GPIO chip remove path on
OF systems
- fix resource leaks in error path in gpiochip_add_data_with_key()
- drop redundant device reference in gpio-mpsse

Tests:
- add selftests for use-after-free cases in GPIO character device code

DT bindings:
- add a DT binding document for SCMI based, gpio-over-pinctrl devices
- fix interrupt description in microchip,mpfs-gpio
- add new compatible for gpio-realtek-otto
- describe the resets of the mpfs-gpio controller
- fix maintainer's email in gpio-delay bindings
- remove the binding document for cavium,thunder-8890 as the corresponding
device is bound over PCI and not firmware nodes

Documentation:
- update the recommended way of converting legacy boards to using software
nodes for GPIO description
- describe GPIO line value semantics
- misc updates to kerneldocs

Misc:
- convert OMAP1 ams-delta board to using GPIO hogs described with software
nodes

----------------------------------------------------------------
AKASHI Takahiro (3):
pinctrl: introduce pinctrl_gpio_get_config()
gpio: dt-bindings: Add GPIO on top of generic pin control
gpio: gpio-by-pinctrl: add pinctrl based generic GPIO driver

Alan Borzeszkowski (1):
gpio: Add Intel Nova Lake ACPI GPIO events driver

Alban Bedel (4):
gpio: kempld: Simplify the bit level register accesses
gpio: kempld: Add support for PLD version >= 2.8
gpio: kempld: Add support for get/set multiple
gpio: kempld: Implement the interrupt controller

Andy Shevchenko (2):
gpio: ts4800: Remove duplicate code to handle 'ngpios' property
gpio: generic: Don't use 'proxy' headers

Arnd Bergmann (1):
gpio: fix up CONFIG_OF dependencies

Bartosz Golaszewski (22):
gpio: introduce a header for symbols shared by suppliers and consumers
gpiolib: match secondary fwnode too in gpio_device_find_by_fwnode()
Merge branch 'gpio/dev-init-rework' into gpio/for-next
Merge tag 'ib-gpio-remove-of-gpio-h-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git into gpio/for-next
arc: axs10x: drop unneeded dependency on OF_GPIO
powerpc: drop unneeded dependency on OF_GPIO
regulator: drop unneeded dependencies on OF_GPIO
gpio: of: clear OF_POPULATED on hog nodes in remove path
gpio: move hogs into GPIO core
gpio: sim: use fwnode-based GPIO hogs
ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes
gpio: remove machine hogs
gpio: sim: allow to define the active-low setting of a simulated hog
gpio: drop unneeded Kconfig dependencies on OF_GPIO
Merge branch 'ib-scmi-pinctrl-gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into gpio/for-next
gpiolib: fix hogs with multiple lines
gpio: sim: stop using dev-sync-probe
gpio: aggregator: stop using dev-sync-probe
gpio: virtuser: stop using dev-sync-probe
gpio: remove dev-sync-probe
Documentation: gpio: update the preferred method for using software node lookup
gpio: swnode: defer probe on references to unregistered software nodes

Chen Jung Ku (1):
gpio: aspeed: fix unsigned long int declaration

Conor Dooley (2):
dt-bindings: gpio: mpfs-gpio: permit resets
dt-bindings: gpio: fix microchip,mpfs-gpio interrupt documentation

Dan Carpenter (4):
pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE
pinctrl: scmi: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support
pinctrl: scmi: ignore PIN_CONFIG_PERSIST_STATE
firmware: arm_scmi: Allow PINCTRL_REQUEST to return EOPNOTSUPP

Dmitry Torokhov (7):
gpio: bd9571mwv: normalize return value of gpio_get
gpio: cgbc: normalize return value of gpio_get
gpio: da9055: normalize return value of gpio_get
gpio: lp873x: normalize return value of gpio_get
gpio: stp-xway: normalize return value of gpio_get
gpio: tps65086: normalize return value of gpio_get
gpio: viperboard: normalize return value of gpio_get

Doug Berger (2):
gpio: brcmstb: implement .irq_mask_ack()
gpio: brcmstb: allow parent_irq to wake

Florian Fainelli (1):
gpio: brcmstb: Utilize irqd_to_hwirq(d) instead of d->hwirq

Geert Uytterhoeven (1):
gpio: gpio-by-pinctrl: s/used to do/is used to do/

Jialu Xu (3):
nfc: s3fwrn5: convert to gpio descriptors
nfc: nfcmrvl: convert to gpio descriptors
gpio: remove of_get_named_gpio() and <linux/of_gpio.h>

Johan Hovold (1):
gpio: mpsse: drop redundant device reference

Jon Hunter (1):
gpiolib: Make deferral warnings debug messages

Kent Gibson (1):
gpio: cdev: convert lineevent_create() and linereq_create() to FD_PREPARE()

Krzysztof Kozlowski (1):
dt-bindings: gpio: gpio-delay: Use Alexander's email

Linus Walleij (3):
gpio: Document line value semantics
gpiolib: Update gpiochip_find_base_unlocked() kerneldoc
Do not enable the v1 uAPI by default

Prathamesh Shete (2):
gpio: tegra186: Simplify GPIO line name prefix handling
gpio: tegra186: Support multi-socket devices

Richard Lyu (1):
gpio: max732x: use guard(mutex) to simplify locking

Rosen Penev (5):
gpio: bcm-kona: reduce the number of memory allocations
gpio: htc-egpio: allocate irq with the main struct
gpio: tegra186: allocate irqs with the main struct
gpio: cs5535: use dynamically allocated priv struct
gpio: dwapb: reduce allocation to single kzalloc

Rustam Adilov (2):
dt-bindings: gpio: realtek-otto: add rtl9607 compatible
gpio: realtek-otto: add rtl9607 support

Shawn Lin (1):
gpio: rockchip: convert to dynamic GPIO base allocation

Shi Hao (1):
dt-bindings: gpio: cavium,thunder-8890: Remove DT binding

Thorsten Blum (1):
gpiolib: replace snprintf("%s") with strscpy

Tzung-Bi Shih (9):
gpio: Fix resource leaks on errors in gpiochip_add_data_with_key()
gpio: Access `gpio_bus_type` in gpiochip_setup_dev()
gpio: Remove redundant check for struct gpio_chip
gpio: sysfs: Remove redundant check for struct gpio_chip
gpio: Ensure struct gpio_chip for gpiochip_setup_dev()
gpio: cdev: Don't check struct gpio_chip in gpio_chrdev_open()
selftests: gpio: Add gpio-cdev-uaf tests
gpio: Fix lockdep warnings in gpiolib_{cdev,sysfs}_register()
Revert "gpio: Access `gpio_bus_type` in gpiochip_setup_dev()"

.../devicetree/bindings/gpio/gpio-delay.yaml | 2 +-
.../devicetree/bindings/gpio/gpio-thunderx.txt | 27 --
.../bindings/gpio/microchip,mpfs-gpio.yaml | 27 +-
.../devicetree/bindings/gpio/pin-control-gpio.yaml | 59 ++++
.../bindings/gpio/realtek,otto-gpio.yaml | 1 +
Documentation/driver-api/gpio/board.rst | 39 ++-
Documentation/driver-api/gpio/driver.rst | 27 ++
Documentation/driver-api/gpio/legacy-boards.rst | 36 ++-
MAINTAINERS | 8 +-
arch/arc/plat-axs10x/Kconfig | 1 -
arch/arm/mach-omap1/board-ams-delta.c | 32 +-
arch/powerpc/platforms/85xx/Kconfig | 1 -
drivers/firmware/arm_scmi/pinctrl.c | 2 +
drivers/gpio/Kconfig | 108 ++++---
drivers/gpio/Makefile | 5 +-
drivers/gpio/TODO | 28 --
drivers/gpio/dev-sync-probe.c | 97 -------
drivers/gpio/dev-sync-probe.h | 25 --
drivers/gpio/gpio-aggregator.c | 38 +--
drivers/gpio/gpio-aspeed.c | 2 +-
drivers/gpio/gpio-bcm-kona.c | 37 +--
drivers/gpio/gpio-bd9571mwv.c | 2 +-
drivers/gpio/gpio-brcmstb.c | 125 +++++---
drivers/gpio/gpio-by-pinctrl.c | 101 +++++++
drivers/gpio/gpio-cgbc.c | 4 +-
drivers/gpio/gpio-cs5535.c | 48 ++-
drivers/gpio/gpio-da9055.c | 2 +-
drivers/gpio/gpio-dwapb.c | 19 +-
drivers/gpio/gpio-htc-egpio.c | 13 +-
drivers/gpio/gpio-kempld.c | 289 +++++++++++++++++-
drivers/gpio/gpio-lp873x.c | 2 +-
drivers/gpio/gpio-max732x.c | 24 +-
drivers/gpio/gpio-mmio.c | 4 +-
drivers/gpio/gpio-mpsse.c | 13 +-
drivers/gpio/gpio-novalake-events.c | 323 +++++++++++++++++++++
drivers/gpio/gpio-realtek-otto.c | 4 +
drivers/gpio/gpio-rockchip.c | 2 +-
drivers/gpio/gpio-sim.c | 241 ++++++++-------
drivers/gpio/gpio-stp-xway.c | 2 +-
drivers/gpio/gpio-tegra186.c | 45 +--
drivers/gpio/gpio-tps65086.c | 2 +-
drivers/gpio/gpio-ts4800.c | 10 -
drivers/gpio/gpio-viperboard.c | 2 +-
drivers/gpio/gpio-virtuser.c | 30 +-
drivers/gpio/gpiolib-acpi-core.c | 70 -----
drivers/gpio/gpiolib-cdev.c | 159 +++-------
drivers/gpio/gpiolib-cdev.h | 2 +-
drivers/gpio/gpiolib-of.c | 183 ++----------
drivers/gpio/gpiolib-of.h | 10 +
drivers/gpio/gpiolib-swnode.c | 8 +
drivers/gpio/gpiolib-sysfs.c | 30 +-
drivers/gpio/gpiolib-sysfs.h | 8 +-
drivers/gpio/gpiolib.c | 323 ++++++++++++---------
drivers/gpio/gpiolib.h | 6 +-
drivers/nfc/nfcmrvl/main.c | 47 +--
drivers/nfc/nfcmrvl/nfcmrvl.h | 4 +-
drivers/nfc/nfcmrvl/uart.c | 23 +-
drivers/nfc/nfcmrvl/usb.c | 2 +-
drivers/nfc/s3fwrn5/i2c.c | 54 +---
drivers/nfc/s3fwrn5/phy_common.c | 11 +-
drivers/nfc/s3fwrn5/phy_common.h | 5 +-
drivers/nfc/s3fwrn5/uart.c | 43 +--
drivers/pinctrl/core.c | 31 ++
drivers/pinctrl/pinconf.h | 6 +
drivers/pinctrl/pinctrl-scmi.c | 46 ++-
drivers/regulator/Kconfig | 2 -
include/linux/gpio/consumer.h | 2 +
include/linux/gpio/defs.h | 9 +
include/linux/gpio/driver.h | 15 +-
include/linux/gpio/generic.h | 8 +-
include/linux/gpio/machine.h | 33 ---
include/linux/mfd/kempld.h | 1 +
include/linux/of_gpio.h | 38 ---
include/linux/pinctrl/consumer.h | 9 +
tools/testing/selftests/gpio/Makefile | 5 +-
tools/testing/selftests/gpio/gpio-cdev-uaf.c | 292 +++++++++++++++++++
tools/testing/selftests/gpio/gpio-cdev-uaf.sh | 63 ++++
77 files changed, 2126 insertions(+), 1331 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt
create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml
delete mode 100644 drivers/gpio/dev-sync-probe.c
delete mode 100644 drivers/gpio/dev-sync-probe.h
create mode 100644 drivers/gpio/gpio-by-pinctrl.c
create mode 100644 drivers/gpio/gpio-novalake-events.c
create mode 100644 include/linux/gpio/defs.h
delete mode 100644 include/linux/of_gpio.h
create mode 100644 tools/testing/selftests/gpio/gpio-cdev-uaf.c
create mode 100755 tools/testing/selftests/gpio/gpio-cdev-uaf.sh