Skip to contentSkip to conversation

i3c: master: Set I2C client for dynamically attached devices

PATCH In review Defa Li 2 participants 2 messages Nov 6

Subsystems (2)
lore
Share & tools
lore

Defa Li

author
#0 lore raw

PATCH 1/1 i3c: master: Set I2C client for dynamically attached devices

The I2C attach callback allocates a descriptor for clients added after the adapter is registered. Store the client in the descriptor after attaching it, matching the setup used for board-info devices.

---
 drivers/i3c/master.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i3c/master.c +2 -0
index 01e05bad8661..690a045bffa0 100644
@@ -3467,6 +3467,8 @@ static int i3c_master_i2c_attach(struct i2c_adapter *adap, struct i2c_client *cl
 	if (ret)
 		goto out_free_dev;
 
+	i2cdev->dev = client;
+
 	return 0;
 
 out_free_dev:
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Defa Li

The I2C attach callback allocates a descriptor for clients added after the adapter is registered. Store the client in the descriptor after attaching it, matching the setup used for board-info devices.

---

Quoted 19 lines
 drivers/i3c/master.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i3c/master.c +2 -1
index 01e05bad8661..690a045bffa0 100644
@@ -3467,6 +3467,8 @@ static int i3c_master_i2c_attach(struct i2c_adapter *adap, struct i2c_client *cl
 	if (ret)
 		goto out_free_dev;
 
+	i2cdev->dev = client;
+
 	return 0;
 
 out_free_dev:
--

2.43.0