]> git.ipfire.org Git - thirdparty/linux.git/commit
gpiolib: allow multiple lookup tables per consumer
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 22 Dec 2025 10:01:26 +0000 (11:01 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 2 Jan 2026 09:34:31 +0000 (10:34 +0100)
commit9700b0fccf386b671e6f8401ddea6c5669cd0914
treef7f2a14631d04091deea479c099f624976b22c2e
parenta05543d6b05ba998fdbb4b383319ae5121bb7407
gpiolib: allow multiple lookup tables per consumer

The GPIO machine lookup mechanism dates back to old ARM board files
where lookup tables would all be defined in a single place. Since then,
lookup tables have also been used to address various DT and ACPI quirks
like missing GPIOs and - as of recently - setting up shared GPIO proxy
devices.

The lookup itself stops when we find the first matching table for a
consumer and - if it doesn't contain the right entry - the lookup fails.

Since the tables can now be defined in multiple places and we can't know
how many there are, effectively limiting a consumer to only a single
lookup table is no longer viable.

Rework the code to always look through all tables matching the consumer.

Link: https://lore.kernel.org/r/20251222-gpio-shared-reset-gpio-proxy-v1-1-8d4bba7d8c14@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpiolib.c