linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/2] i2c: mux: Propagate firmware nodes to channel adapters
@ 2026-09-03 19:40 Ahmad Byagowi
  2026-09-03 19:40 ` [PATCH v9 1/2] i2c: mux: Factor out channel node lookup Ahmad Byagowi
  2026-09-03 19:40 ` [PATCH v9 2/2] i2c: mux: Propagate firmware nodes to channel adapters Ahmad Byagowi
  0 siblings, 2 replies; 4+ messages in thread
From: Ahmad Byagowi @ 2026-09-03 19:40 UTC (permalink / raw)
  To: Andi Shyti
  Cc: Peter Rosin, Andy Shevchenko, Jakub Kicinski, linux-i2c,
	linux-kernel, Ahmad Byagowi

Device Tree channel nodes are associated with the adapters created by
i2c-mux, but equivalent firmware-node descriptions are not. Convert the
existing lookup to generic firmware-node operations so software-node and
ACPI descriptions can use the same property traversal.

This is the remaining I2C prerequisite split out of the Time Card series.
The channel-node leak fix from v7 was applied to i2c-next as commit
385c7af4e3b9 ("i2c: mux: Fix channel node leak on adapter add failure"), so
it is no longer included here. The first patch factors the Device Tree
lookup into a helper without changing behavior. The second converts the
helper and node lifetime handling to generic firmware-node operations.

The existing acpi_preset_companion() call remains in place after the generic
lookup. A separate reference to the node returned by that lookup is retained
because ACPI companion setup may replace the adapter's primary firmware
node. The dependent ptp_ocp board profiles will be resent to net-next after
the LED and I2C prerequisites land.

Changes since v8:
  - Split the dev_node declaration from its assignment and use
    dev_of_node() in the Device Tree helper, as suggested by Andy
    Shevchenko.
  - Preserve the split declaration and assignment when converting the
    helper to dev_fwnode().
  - Leave broader __free(fwnode_handle) cleanup for a separate follow-up.

Validation:
  - git diff --check
  - strict checkpatch with an 80-column limit
  - x86-64 GCC W=1 object build of drivers/i2c/i2c-mux.o
  - mailbox replay onto the declared base with an identical resulting tree

v8: https://lore.kernel.org/r/cover.1788181174.git.ahmadexp@gmail.com/

Ahmad Byagowi (2):
  i2c: mux: Factor out channel node lookup
  i2c: mux: Propagate firmware nodes to channel adapters

 drivers/i2c/i2c-mux.c | 97 +++++++++++++++++++++++--------------------
 1 file changed, 51 insertions(+), 46 deletions(-)


base-commit: 1f3e66348d2527c31b9bedb0b4d9e28bdad9bc83
-- 
2.50.1 (Apple Git-155)


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

end of thread, other threads:[~2026-09-03 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 19:40 [PATCH v9 0/2] i2c: mux: Propagate firmware nodes to channel adapters Ahmad Byagowi
2026-09-03 19:40 ` [PATCH v9 1/2] i2c: mux: Factor out channel node lookup Ahmad Byagowi
2026-09-03 19:58   ` Andy Shevchenko
2026-09-03 19:40 ` [PATCH v9 2/2] i2c: mux: Propagate firmware nodes to channel adapters Ahmad Byagowi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).