Re: [PATCH v6 1/5] i3c: ccc: Add actual_len to struct i3c_ccc_cmd_payload

Frank Li <[email protected]> Wed, 8 Jul 2026 08:11:56 -0500
Newsgroups org.infradead.lists.linux-i3c,dev.linux.lists.imx,org.kernel.vger.linux-kernel
Message-ID <ak5MnCrhimv1TrFJ@SMW015318>
On Wed, Jul 08, 2026 at 12:17:37AM -0700, [email protected] wrote:
> From: Adrian Ng Ho Yin <[email protected]>
>
> Add actual_len to struct i3c_ccc_cmd_payload so drivers can report how
> many bytes were received on a GET CCC without overwriting the requested
> buffer length in len.
>
> Signed-off-by: Adrian Ng Ho Yin <[email protected]>
> Signed-off-by: Tze Yee Ng <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

> Changes in v5:
> - Split from v4 patch 1/3: ccc.h only; no driver changes in this patch.
> ---
>  include/linux/i3c/ccc.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/i3c/ccc.h b/include/linux/i3c/ccc.h
> index ad59a4ae60d1..d8052949e57e 100644
> --- a/include/linux/i3c/ccc.h
> +++ b/include/linux/i3c/ccc.h
> @@ -343,11 +343,13 @@ struct i3c_ccc_getxtime {
>  /**
>   * struct i3c_ccc_cmd_payload - CCC payload
>   *
> - * @len: payload length
> + * @len: requested payload length
> + * @actual_len: number of bytes received on a GET CCC (filled by the driver)
>   * @data: payload data. This buffer must be DMA-able
>   */
>  struct i3c_ccc_cmd_payload {
>  	u16 len;
> +	u16 actual_len;
>  	void *data;
>  };
>
> --
> 2.43.7
>
>

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c