* [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter
@ 2026-03-02 7:56 Peter Yin
2026-03-02 20:22 ` Frank Li
2026-03-11 21:52 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Peter Yin @ 2026-03-02 7:56 UTC (permalink / raw)
To: Alexandre Belloni, Frank Li, Adrian Ng Ho Yin, Wolfram Sang,
Manikanta Guntupalli, Zilin Guan, Jorge Marques, Sakari Ailus,
linux-i3c, linux-kernel
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>
---
Changes in v3:
- Use device_set_of_node_from_dev() instead of direct of_node assignment.
Changes in v2:
- Move the fix from the ast2600-specific driver to the dw-i3c common.
drivers/i3c/master/dw-i3c-master.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index d87bde3f7700..d334c217c7a3 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -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)
--
2.43.0
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter
2026-03-02 7:56 [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter Peter Yin
@ 2026-03-02 20:22 ` Frank Li
2026-03-11 21:52 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Frank Li @ 2026-03-02 20:22 UTC (permalink / raw)
To: Peter Yin
Cc: Alexandre Belloni, Adrian Ng Ho Yin, Wolfram Sang,
Manikanta Guntupalli, Zilin Guan, Jorge Marques, Sakari Ailus,
linux-i3c, linux-kernel
On Mon, Mar 02, 2026 at 03:56:42PM +0800, Peter Yin wrote:
> 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>
>
> Changes in v3:
> - Use device_set_of_node_from_dev() instead of direct of_node assignment.
>
> Changes in v2:
> - Move the fix from the ast2600-specific driver to the dw-i3c common.
>
> drivers/i3c/master/dw-i3c-master.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index d87bde3f7700..d334c217c7a3 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -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)
> --
> 2.43.0
>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter
2026-03-02 7:56 [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter Peter Yin
2026-03-02 20:22 ` Frank Li
@ 2026-03-11 21:52 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2026-03-11 21:52 UTC (permalink / raw)
To: Frank Li, Adrian Ng Ho Yin, Wolfram Sang, Manikanta Guntupalli,
Zilin Guan, Jorge Marques, Sakari Ailus, linux-i3c, linux-kernel,
Peter Yin
On Mon, 02 Mar 2026 15:56:42 +0800, Peter Yin wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter
https://git.kernel.org/i3c/c/f26ecaa0f0ab
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-11 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 7:56 [PATCH v3] i3c: master: dw-i3c: Fix missing of_node for virtual I2C adapter Peter Yin
2026-03-02 20:22 ` Frank Li
2026-03-11 21:52 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox