Skip to content

Migrate the multiplexer subsystem to fwnode

Fabio Forni b4-sent linux-gpio lkml 5 versions – In review

Get series with b4
b4 am [email protected] change-id 20260915-mux_fwnode-a16593c39ffd

Versions newest first

  1. v5 Latest3 patches 1 replyIn review
  2. v43 patches 0 repliesSuperseded
  3. v33 patches 4 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch4 repliesSuperseded
v11 patch3 repliesSuperseded

Changes in v5 from the cover letter

- Rebase against master, up to 7cd8495c0f16 ("Merge tag 'io_uring-7.4-20261127' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux")
- Link to v4: https://lore.kernel.org/r/[email protected]

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mux: Avoid use-after-free of args.np in mux_get()drivers/mux/core.c+21 -90 replies
2/3mux: convert to use fwnode interfacedrivers/mux/core.c drivers/pinctrl/pinctrl-generic-mux.c include/linux/mux/consumer.h+57 -490 replies
3/3mux: Document mux_chip_find_by_fwnode()drivers/mux/core.c+10 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode

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.

v5 is a rebase against most recent master branch, plus a resend, as v4 was neither acked not nacked.

---
Changes in v5:
- Rebase against master, up to 7cd8495c0f16 ("Merge tag 'io_uring-7.4-20261127' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux")
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- The patch that fixes the use-after-free bug is applied before converting mux to fwnode, so that it can potentially be backported.
- Link to v3: https://lore.kernel.org/r/[email protected]

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/[email protected]

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/[email protected]

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

 drivers/mux/core.c                    | 135 ++++++++++++++++++++--------------
 drivers/pinctrl/pinctrl-generic-mux.c |   4 +-
 include/linux/mux/consumer.h          |   6 +-
 3 files changed, 87 insertions(+), 58 deletions(-)

---
base-commit: 7cd8495c0f16275c4f9abe1cef09a7b5fcd6d046
change-id: 20260915-mux_fwnode-a16593c39ffd

Best regards,

Signature · 1 line
Fabio Forni <[email protected]>