summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorAkshay Gupta <Akshay.Gupta@amd.com>2026-03-18 16:57:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-02 16:17:29 +0200
commit82e1288701c0b746397f2a133b1f93d3d48eee23 (patch)
tree03c06f36fc6b37d8ae443566b92349e9cb53ec25 /drivers/misc
parentb5e7fb39819aec09a27c89f203774ffc6b13a78d (diff)
downloadlinux-next-82e1288701c0b746397f2a133b1f93d3d48eee23.tar.gz
linux-next-82e1288701c0b746397f2a133b1f93d3d48eee23.zip
misc: amd-sbi: Add check to probe only SBRMI devices
AMD OOB devices are differentiated by their Instance ID, with SBRMI assigned Instance ID 1. Since the device ID match does not consider the Instance ID, add an explicit check to restrict probing to only the SBRMI device and exclude other OOB devices. Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com> Signed-off-by: Akshay Gupta <Akshay.Gupta@amd.com> Link: https://patch.msgid.link/20260318112711.2757467-2-Akshay.Gupta@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/amd-sbi/rmi-i2c.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/amd-sbi/rmi-i2c.c b/drivers/misc/amd-sbi/rmi-i2c.c
index f0cc99000b69..04182358bebb 100644
--- a/drivers/misc/amd-sbi/rmi-i2c.c
+++ b/drivers/misc/amd-sbi/rmi-i2c.c
@@ -170,6 +170,16 @@ static int sbrmi_i3c_probe(struct i3c_device *i3cdev)
struct regmap *regmap;
int rev, ret;
+ /*
+ * AMD OOB devices are distinguished by their Instance ID.
+ * For SBRMI, the Instance ID is 1. Since the device ID match
+ * does not account for the Instance ID, the following check
+ * ensures that only the SBRMI device is probed, excluding
+ * other OOB devices.
+ */
+ if (I3C_PID_INSTANCE_ID(i3cdev->desc->info.pid) != 1)
+ return -ENXIO;
+
regmap = devm_regmap_init_i3c(i3cdev, &sbrmi_regmap_config);
if (IS_ERR(regmap))
return PTR_ERR(regmap);