[PATCH v3 0/5] gpiolib: of: quirk cleanups and TWL4030 external mute quirk

From: Dmitry Torokhov

Date: Thu Oct 22 2026 - 17:54:00 EST


This series contains minor cleanups to drivers/gpio/gpiolib-of.c and
adds a legacy property quirk for TWL4030.

Specifically, it removes a redundant IS_ENABLED() check in
of_find_mt2701_gpio(), compiles of_find_trigger_gpio() conditionally on
CONFIG_LEDS_TRIGGER_GPIO, adds a legacy property name quirk for the
TWL4030 codec external mute GPIO ("ti,hs_extmute_gpio"), cleans up
formatting in drivers/gpio/gpiolib-of.c to pass checkpatch, and uses
__free(device_node) in of_get_named_gpiod_flags().

Note that the companion fix for the TWL4030 codec driver itself (which
fixes looking up the GPIO on the "codec" child node) has been posted
separately [1] and has no build-time dependency on this series.

[1] https://lore.kernel.org/r/20261022-twl4030-extmute-v1-0-3d2dbe260df9@xxxxxxxxx

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
Changes in v3:
- Rebased onto latest linux-next.
- Pass idx instead of 0 to of_get_named_gpiod_flags() in
of_find_twl4030_gpio().
- Fix typos and clarify commit message in patch 3/5 and 4/5.
- Add patch 5/5 using __free(device_node) in
of_get_named_gpiod_flags().
- Link to v2: https://patch.msgid.link/20260724051822.3545532-1-dmitry.torokhov@xxxxxxxxx

Changes in v2:
- Fix ti,twl4030-audio compatible string in patch 3/5 (Bartosz).
- Link to v1: https://patch.msgid.link/20260718041311.2605172-1-dmitry.torokhov@xxxxxxxxx

To: Linus Walleij <linusw@xxxxxxxxxx>
To: Bartosz Golaszewski <brgl@xxxxxxxxxx>
Cc: linux-gpio@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Dmitry Torokhov (5):
gpiolib: of: remove redundant IS_ENABLED check in of_find_mt2701_gpio()
gpiolib: of: compile of_find_trigger_gpio() conditionally
gpiolib: of: add a quirk for legacy name for TWL4030 external mute GPIO
gpiolib: of: clean up formatting to pass checkpatch
gpiolib: of: use __free(device_node) in of_get_named_gpiod_flags()

drivers/gpio/gpiolib-of.c | 101 ++++++++++++++++++++++++++++------------------
1 file changed, 61 insertions(+), 40 deletions(-)
---
base-commit: 8f7df005a7564bd7ffa75da9c3085d5b996f1e16
change-id: 20261021-gpiolib-of-4c43744d4971

Thanks.

--
Dmitry