]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter
authorPeter Yin <peteryin.openbmc@gmail.com>
Mon, 2 Mar 2026 07:56:42 +0000 (15:56 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 11 Mar 2026 21:48:26 +0000 (22:48 +0100)
The DesignWare I3C master driver creates a virtual I2C adapter to
provide backward compatibility with I2C devices. However, the current
implementation does not associate this virtual adapter with any
Device Tree node.

Propagate the of_node from the I3C master platform device to the
virtual I2C adapter's device structure. This ensures that standard
I2C aliases are correctly resolved and bus numbering remains consistent.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260302075645.1492766-1-peteryin.openbmc@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/dw-i3c-master.c

index d87bde3f7700f952a0080bf285d1241ca5bfb96b..d334c217c7a38874c7490b6889456ea120a65d9a 100644 (file)
@@ -1659,6 +1659,8 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
                pm_runtime_get_noresume(&pdev->dev);
 
        INIT_WORK(&master->hj_work, dw_i3c_hj_work);
+
+       device_set_of_node_from_dev(&master->base.i2c.dev, &pdev->dev);
        ret = i3c_master_register(&master->base, &pdev->dev,
                                  &dw_mipi_i3c_ops, false);
        if (ret)