[PATCH v9 2/7] i3c: master: Add the APIs to support I3C hub

Frank Li Frank.li at nxp.com
Mon Apr 20 20:09:57 PDT 2026


On Mon, Apr 20, 2026 at 04:22:17PM +0530, Lakshay Piplani wrote:
> From: Aman Kumar Pandey <aman.kumarpandey at nxp.com>
>
> Add simple helpers to direct attach/detach I3C devices and two CCC helpers
> to check CCC support and send CCC commands. These additions prepare the
> master core for I3C hub support.

Nit: This additions prepare for I3C hub support.

>
> 1) i3c_master_direct_attach_i3c_dev()
> 2) i3c_master_direct_detach_i3c_dev()
> 3) i3c_master_send_ccc_cmd()
> 4) i3c_master_supports_ccc_cmd()
>
> Signed-off-by: Aman Kumar Pandey <aman.kumarpandey at nxp.com>
> Signed-off-by: Lakshay Piplani <lakshay.piplani at nxp.com>
>
> ---
> Changes in v9:
>  - No change
>
> Changes in v8:
>  - No change
>
> Changes in v7:
>  - Update commit message to clarify purpose (prepare for I3C hub support)
>
> Changes in v6:
>  - Split the patch into two parts:
>         1) expose the existing API
>         2) add new APIs.
> ---
> ---
>  drivers/i3c/master.c       | 103 +++++++++++++++++++++++++++++++++++++
>  include/linux/i3c/master.h |   8 +++
>  2 files changed, 111 insertions(+)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index d11fe6937ba8..2b88021d8a23 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -1652,6 +1652,59 @@ static int i3c_master_attach_i3c_dev(struct i3c_master_controller *master,
>  	return 0;
>  }
>
> +/**
> + * i3c_master_direct_attach_i3c_dev() - attach an I3C device to a master
> + * @master: I3C master controller to attach the device to
> + * @dev: I3C device descriptor representing the device
> + *
> + * This function attaches an I3C device to its master controller once the
> + * device has a valid address on the bus. Devices without
> + * an assigned address are ignored. The master device itself is never

Nit: wrap at consistent position. (such as 80 chars), check others.

Frank




More information about the linux-i3c mailing list