Skip to content

Commit 447270c

Browse files
Wolfram Sangalexandrebelloni
authored andcommitted
i3c: don't fail if GETHDRCAP is unsupported
'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. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 4f5ee64 commit 447270c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i3c/master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ static int i3c_master_retrieve_dev_info(struct i3c_dev_desc *dev)
14391439

14401440
if (dev->info.bcr & I3C_BCR_HDR_CAP) {
14411441
ret = i3c_master_gethdrcap_locked(master, &dev->info);
1442-
if (ret)
1442+
if (ret && ret != -ENOTSUPP)
14431443
return ret;
14441444
}
14451445

0 commit comments

Comments
 (0)