Skip to content

fixup! gpiolib: Override gpiochip numbers with DT aliases#7341

Merged
pelwell merged 1 commit intoraspberrypi:rpi-6.18.yfrom
pelwell:gpiochipfix
Apr 29, 2026
Merged

fixup! gpiolib: Override gpiochip numbers with DT aliases#7341
pelwell merged 1 commit intoraspberrypi:rpi-6.18.yfrom
pelwell:gpiochipfix

Conversation

@pelwell
Copy link
Copy Markdown
Contributor

@pelwell pelwell commented Apr 29, 2026

Commit [1] shuffled the initialisation of gpiochips, breaking the downstream patch that sets the chip numbers based on DT aliases.

Fix the downstream patch by determining the of_node on the fly, rather than assuming it has already been set. This does result in more calls to gpiochip_choose_fwnode() than are necessary, but it reduces the scope of the patch and makes it more resilient.

Signed-off-by: Phil Elwell phil@raspberrypi.com

[1] 16fdabe ("gpio: Fix resource leaks on errors in
gpiochip_add_data_with_key()")

Commit [1] shuffled the initialisation of gpiochips, breaking the
downstream patch that sets the chip numbers based on DT aliases.

Fix the downstream patch by determining the of_node on the fly, rather
than assuming it has already been set. This does result in more calls to
gpiochip_choose_fwnode() than are necessary, but it reduces the scope of
the patch and makes it more resilient.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>

[1] 16fdabe ("gpio: Fix resource leaks on errors in
    gpiochip_add_data_with_key()")
@pelwell pelwell merged commit f58c91b into raspberrypi:rpi-6.18.y Apr 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants