Skip to contentSkip to conversation

i3c: mipi-i3c-hci: Support SETDASA CCC

PATCH Applied Billy Tsai 3 participants 3 messages Nov 13, 2024 – Nov 18, 2024 I3C

lore
Share & tools
lore

Billy Tsai

author
#0 lore raw

PATCH 1/1 i3c: mipi-i3c-hci: Support SETDASA CCC

When the I3C subsystem wants to assign a dynamic address using the SETDASA CCC, it needs to attach the I3C device with device info that includes only the static address. In the HCI, if the driver want to send this SETDASA CCC, a DAT entry is required to temporarily fill the device's static address into the dynamic address field. Afterward, the reattach API will be executed to update the DAT with the correct dynamic addrees value.

---
 drivers/i3c/master/mipi-i3c-hci/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i3c/master/mipi-i3c-hci/core.c +2 -1
index a82c47c9986d..6655e8396a35 100644
@@ -438,7 +438,8 @@ static int i3c_hci_attach_i3c_dev(struct i3c_dev_desc *dev)
 			kfree(dev_data);
 			return ret;
 		}
-		mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret, dev->info.dyn_addr);
+		mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret,
+						     dev->info.dyn_addr ?: dev->info.static_addr);
 		dev_data->dat_idx = ret;
 	}
 	i3c_dev_set_master_data(dev, dev_data);
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Billy Tsai

When the I3C subsystem wants to assign a dynamic address using the SETDASA CCC, it needs to attach the I3C device with device info that includes only the static address. In the HCI, if the driver want to send this SETDASA CCC, a DAT entry is required to temporarily fill the device's static address into the dynamic address field. Afterward, the reattach API will be executed to update the DAT with the correct dynamic addrees value.

Quoted 5 lines
---
  drivers/i3c/master/mipi-i3c-hci/core.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

(Minor comment to the subject. Is this rather fix than support SETDASA?)

maintainer Applied
#2 lore raw
In reply to Billy Tsai
Quoted 8 lines · Billy Tsai

When the I3C subsystem wants to assign a dynamic address using the SETDASA CCC, it needs to attach the I3C device with device info that includes only the static address. In the HCI, if the driver want to send this SETDASA CCC, a DAT entry is required to temporarily fill the device's static address into the dynamic address field. Afterward, the reattach API will be executed to update the DAT with the correct dynamic addrees value.

[...]

Applied, thanks!

[1/1] i3c: mipi-i3c-hci: Support SETDASA CCC

      https://git.kernel.org/abelloni/c/2b50719dd92f

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com