Re: [PATCH 1/2] dt-bindings: i2c: convert i2c-mux-reg to DT schema

From: Abdurrahman Hussain

Date: Sun Jun 07 2026 - 20:39:55 EST


On Sun, 7 Jun 2026 15:06:43 +0100, Conor Dooley wrote:
> I think it is fairly likely that this property won't be acceptable.
> The conversion itself looks okay to me.

Thanks for the hint -- I dug into the i2c core and realised the case
I was trying to solve already works on OF without any new binding.
i2c_mux_add_adapter() sets the child adapter's of_node to the
matching i2c@N node (drivers/i2c/i2c-mux.c:330..367), and
i2c_add_adapter() then honours of_alias_get_id(dev->of_node, "i2c")
(drivers/i2c/i2c-core-base.c:1657). So in DT, the existing aliases
mechanism already pins mux child buses:

aliases {
i2c16 = &my_mux_bus0;
i2c17 = &my_mux_bus1;
};

i2c-mux@... {
compatible = "i2c-mux-reg";
...
my_mux_bus0: i2c@0 { reg = <0>; ... };
my_mux_bus1: i2c@1 { reg = <1>; ... };
};

That's clearly the right answer; sorry for not finding it before
sending. The only wrinkle is that of_alias_get_id() is OF-only, so
this doesn't help the ACPI/swnode platform that originally motivated
me -- but that's a Linux-side problem (udev rules, stable adapter
names) and not something a new DT property should paper over.

I'll respin v2 as just the .txt -> YAML conversion (faithful port,
no new property), and fix the silabs,si5338 example that Rob's bot
flagged.

Thanks,
Abdurrahman.