[PATCH v7 0/3] i2c: mux: Propagate software nodes to channel adapters

Ahmad Byagowi posted 3 patches 1 month ago
drivers/i2c/i2c-mux.c | 96 +++++++++++++++++++++++--------------------
1 file changed, 52 insertions(+), 44 deletions(-)
[PATCH v7 0/3] i2c: mux: Propagate software nodes to channel adapters
Posted by Ahmad Byagowi 1 month ago
Device Tree channel nodes are associated with the adapters created by
i2c-mux, but equivalent software-node descriptions are not. Use generic
firmware-node operations for the channel lookup so child I2C devices can be
instantiated from software-node properties.

This is the I2C prerequisite split out of the Time Card series. The first
patch fixes the existing Device Tree channel-node leak on adapter-add
failure. The second factors the Device Tree lookup into a helper without
changing behavior. The third converts that helper and the node lifetime
handling to generic firmware-node operations.

The dependent ptp_ocp board profiles will be resent to net-next after the
LED and I2C prerequisites land.

---

Changes since v6:
  - Split the existing Device Tree leak fix into its own patch.
  - Add a preparatory patch that only factors out the OF lookup.
  - Convert the helper to generic firmware-node operations in the final
    patch.
  - Drop the separate private software-node pointer and use the adapter's
    firmware node for cleanup.
  - Save the firmware node before adapter deletion, then release it
    afterwards following the i2c-atr lifetime pattern.
  - Rebase onto the current I2C i2c-next branch.

Validation:
  - git diff --check
  - strict checkpatch
  - x86-64 Clang syntax check

v6: https://lore.kernel.org/r/eb4a8ab1eedd8a01ca34c6a7e0685639d0498423.1787247467.git.ahmadexp@gmail.com/

Ahmad Byagowi (3):
  i2c: mux: Fix channel node leak on adapter add failure
  i2c: mux: Factor out channel node lookup
  i2c: mux: Propagate software nodes to channel adapters

 drivers/i2c/i2c-mux.c | 96 +++++++++++++++++++++++--------------------
 1 file changed, 52 insertions(+), 44 deletions(-)


base-commit: cd5fec79af3fa04e88e5900cdfa56d5525f5740b
-- 
2.50.1 (Apple Git-155)
Re: [PATCH v7 0/3] i2c: mux: Propagate software nodes to channel adapters
Posted by Andi Shyti 1 month ago
Hi Ahmad,

> Ahmad Byagowi (3):
>   i2c: mux: Fix channel node leak on adapter add failure

I merged this first patch into i2c/i2c-fixes, while...

>   i2c: mux: Factor out channel node lookup
>   i2c: mux: Propagate software nodes to channel adapters

... I left these out because there are some pending comments.

Thanks,
Andi