[PATCH v2] i3c: don't fail if GETHDRCAP is unsupported

Frank Li Frank.li at nxp.com
Mon Jul 7 09:25:45 PDT 2025


On Fri, Jul 04, 2025 at 10:44:32PM +0200, Wolfram Sang wrote:
> 'I3C_BCR_HDR_CAP' is still spec v1.0 and has been renamed to 'advanced
> capabilities' in v1.1 onwards. The ST pressure sensor LPS22DF does not
> have HDR, but has the 'advanced cap' bit set. The core still wants to
> get additional information using the CCC 'GETHDRCAP' (or GETCAPS in v1.1
> onwards). Not all controllers support this CCC and will notify the upper
> layers about it. For instantiating the device, we can ignore this
> unsupported CCC as standard communication will work. Without this patch,
> the device will not be instantiated at all.
>

Reviewed-by: Frank Li <Frank.Li at nxp.com>

> Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
> ---
>
> Changes since v1:
> * updated commit message
>
> Please note that Joshua Yeong was also in favor of this patch. Sadly, he
> did not send an official Acked-by yet.
>
>  drivers/i3c/master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index fd81871609d9..e53c69d24873 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -1439,7 +1439,7 @@ static int i3c_master_retrieve_dev_info(struct i3c_dev_desc *dev)
>
>  	if (dev->info.bcr & I3C_BCR_HDR_CAP) {
>  		ret = i3c_master_gethdrcap_locked(master, &dev->info);
> -		if (ret)
> +		if (ret && ret != -ENOTSUPP)
>  			return ret;
>  	}
>
> --
> 2.47.2
>



More information about the linux-i3c mailing list