Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20241113035826.923918-1-billy_tsai@aspeedtech.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Billy Tsai and committed by
Alexandre Belloni
2b50719d 473d0cb4

+2 -1
+2 -1
drivers/i3c/master/mipi-i3c-hci/core.c
··· 436 436 kfree(dev_data); 437 437 return ret; 438 438 } 439 - mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret, dev->info.dyn_addr); 439 + mipi_i3c_hci_dat_v1.set_dynamic_addr(hci, ret, 440 + dev->info.dyn_addr ?: dev->info.static_addr); 440 441 dev_data->dat_idx = ret; 441 442 } 442 443 i3c_dev_set_master_data(dev, dev_data);