[PATCH] of: property: add i2c-parent to fw_devlink supplier bindings
Abdurrahman Hussain <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <20260813-b4-of-property-add-i2c-parent-v1-1-a2487e920ce1@nexthop.ai> |
Platform-device i2c muxes (i2c-mux-reg, i2c-mux-gpio, ...) reference the bus they multiplex with an i2c-parent phandle and hold a reference on that adapter from probe until remove. Unlike muxes that are clients on the parent bus, they live outside the adapter's device hierarchy, so nothing orders their teardown against it: if the adapter's device is unbound first — e.g. while reverting a device-tree overlay whose changeset attached the mux nodes before the controller nodes — i2c_del_adapter() blocks forever in wait_for_completion(&adap->dev_released), waiting for a reference that is only dropped later in the same teardown sequence. Teach fw_devlink about i2c-parent so the core creates the corresponding device links: consumers are unbound before the parent adapter's device, and probe ordering no longer needs -EPROBE_DEFER. --- Signed-off-by: Abdurrahman Hussain <[email protected]> --- drivers/of/property.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index 72cf12907de0..c1e89629c842 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1409,6 +1409,7 @@ DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") DEFINE_SIMPLE_PROP(leds, "leds", NULL) DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) DEFINE_SIMPLE_PROP(panel, "panel", NULL) +DEFINE_SIMPLE_PROP(i2c_parent, "i2c-parent", NULL) DEFINE_SIMPLE_PROP(msi_parent, "msi-parent", "#msi-cells") DEFINE_SIMPLE_PROP(post_init_providers, "post-init-providers", NULL) DEFINE_SIMPLE_PROP(access_controllers, "access-controllers", "#access-controller-cells") @@ -1562,6 +1563,7 @@ static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_resets, }, { .parse_prop = parse_leds, }, { .parse_prop = parse_backlight, }, + { .parse_prop = parse_i2c_parent, }, { .parse_prop = parse_panel, }, { .parse_prop = parse_msi_parent, }, { .parse_prop = parse_pses, }, --- base-commit: d58772d8520c7ef247c4b95c9bd76d3a25da9ff5 change-id: 20260813-b4-of-property-add-i2c-parent-168c6d7f1934 Best regards, -- Abdurrahman Hussain <[email protected]>