Re: [PATCH v2 04/13] i3c: master: Support ACPI enumeration of child devices

Alexandre Belloni
2026-04-12T20:18:08Z

On 10/04/2026 11:01:47+0530, Akhil R wrote:
> On Thu, 9 Apr 2026 22:17:22 -0400, Frank Li wrote:
> > On Thu, Apr 09, 2026 at 04:27:34PM +0530, Akhil R wrote:
> >> Although the existing subsystem allows host controllers to register
> >> through the ACPI table, it was not possible to describe I3C or I2C
> >> devices when using ACPI. This is because the driver relied on reg
> >> property to retrieve the PID, static address etc whereas ACPI uses
> >> _ADR or serial resources to describe such devices.
> >>
> >> Read _ADR and LVR from the ACPI resources and extract the data as per the
> >> ACPI specification for an I3C bus. Also read mipi-i3c-static-address as
> >> per the MIPI DISCO specifications [1] to get the static address to be
> >> used. Hence enable describing the I3C or I2C devices in the ACPI
> >> table, which is required if the device is using a static address or if it
> >> needs some specific properties to be attached to it.
> >
> > Please wrap your commit message at 75 char.
>
> Ack. Will do.
>
> >
> >>
> >> [1] https://www.mipi.org/mipi-disco-for-i3c-download
> >>
> >> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> >> ---
> >> drivers/i3c/master.c | 140 ++++++++++++++++++++++++++++++++++++++++---
> >> 1 file changed, 132 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> >> index 5e0e926f61f3..08d0fcabd6f1 100644
> >> --- a/drivers/i3c/master.c
> >> +++ b/drivers/i3c/master.c
> >> @@ -5,6 +5,7 @@
> >> * Author: Boris Brezillon <boris.brezillon@bootlin.com>
> >> */
> >>
> >> +#include <linux/acpi.h>
> >> #include <linux/atomic.h>
> >> #include <linux/bug.h>
> >> #include <linux/device.h>
> >> @@ -2403,6 +2404,53 @@ EXPORT_SYMBOL_GPL(i3c_master_add_i3c_dev_locked);
> >>
> >> #define OF_I3C_REG1_IS_I2C_DEV BIT(31)
> >>
> >> +#ifdef CONFIG_ACPI
> > ...
> >
> >> +#ifdef CONFIG_ACPI
> >> +static int i3c_master_add_acpi_dev(struct i3c_master_controller *master,
> >> + struct fwnode_handle *fwnode)
> >
> >
> > Can you move this and below function to previous #ifdef CONFIG_ACPI block.
>
> Ack. I will update, but there are some cross-dependencies. We may have to
> add a few function prototypes with the headers if we have to move these
> under the same block. Hope that is fine.
>

If you have cross-dependencies, then I guess they can sty separate
blocks.

--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering