[PATCH v3 0/3] Migrate the multiplexer subsystem to fwnode

From: Fabio Forni via B4 Relay

Date: Tue Sep 29 2026 - 16:52:11 EST


This patch migrates the multiplexer subsystem from using the of_*
family of functions and structs, to the more generic fwnode framework.

It is a rebase of a single commit[1] contained in a old patch series[2]
submitted by Xu Yang. The original commit plus follow-up comments were
tested on kernel v6.12 on an arm64-based board, but this current rebase
isn't tested yet.

While at it, a use-after-free bug was fixed in mux_get(), as suggested by
Alvin Šipraga.

Link: https://lore.kernel.org/all/20220823195429.1243516-3-xu.yang_2@xxxxxxx [1]
Link: https://lore.kernel.org/all/20220823195429.1243516-1-xu.yang_2@xxxxxxx [2]

Signed-off-by: Fabio Forni <development@xxxxxxxxxx>
---
Changes in v3:
- Expand documentation of mux_chip_find_by_fwnode().
- Fix use-after-free bug in mux_get().
- Link to v2: https://lore.kernel.org/r/20260916-mux_fwnode-v2-1-58f1d85b9dde@xxxxxxxxxx

Changes in v2:
- Rename devm_mux_state_get_from_swnode into devm_mux_state_get_from_fwnode
- Link to v1: https://lore.kernel.org/r/20260915-mux_fwnode-v1-1-ed5a6d8202d4@xxxxxxxxxx

---
Fabio Forni (3):
mux: convert to use fwnode interface
mux: Document mux_chip_find_by_fwnode()
mux: Avoid use-after-free of args.fwnode in mux_get()

drivers/mux/core.c | 134 ++++++++++++++++++++--------------
drivers/pinctrl/pinctrl-generic-mux.c | 4 +-
include/linux/mux/consumer.h | 6 +-
3 files changed, 86 insertions(+), 58 deletions(-)
---
base-commit: f6e7b42bf05b2427fb8a7a1d1c387a86638bb413
change-id: 20260915-mux_fwnode-a16593c39ffd

Best regards,
--
Fabio Forni <development@xxxxxxxxxx>