Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode
@ 2026-11-28 10:43 Fabio Forni via B4 Relay
  2026-11-28 10:43 ` [PATCH v5 1/3] mux: Avoid use-after-free of args.np in mux_get() Fabio Forni via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Fabio Forni via B4 Relay @ 2026-11-28 10:43 UTC (permalink / raw)
  To: Peter Rosin, Linus Walleij, Greg Kroah-Hartman, Jonathan Cameron,
	Philipp Zabel
  Cc: linux-kernel, linux-gpio, xu.yang_2, Alvin Šipraga,
	Fabio Forni

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.
                                                                           
Link: https://lore.kernel.org/all/20220823195429.1243516-3-xu.yang_2@nxp.com [1]
Link: https://lore.kernel.org/all/20220823195429.1243516-1-xu.yang_2@nxp.com [2]

Signed-off-by: Fabio Forni <development@redaril.me>
---
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/20261008-mux_fwnode-v4-0-ba3330e44b2a@redaril.me

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/20260929-mux_fwnode-v3-0-9b3b9ae1334e@redaril.me

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@redaril.me

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@redaril.me

---
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,
-- 
Fabio Forni <development@redaril.me>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-28 12:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 10:43 [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode Fabio Forni via B4 Relay
2026-11-28 10:43 ` [PATCH v5 1/3] mux: Avoid use-after-free of args.np in mux_get() Fabio Forni via B4 Relay
2026-11-28 10:43 ` [PATCH v5 2/3] mux: convert to use fwnode interface Fabio Forni via B4 Relay
2026-11-28 10:53   ` sashiko-bot
2026-11-28 10:43 ` [PATCH v5 3/3] mux: Document mux_chip_find_by_fwnode() Fabio Forni via B4 Relay
2026-11-28 12:16 ` [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode Fabio Forni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox