Skip to content

Commit

Permalink
i3c: mipi-i3c-hci: Support SETDASA CCC
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jarkko Nikula <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
billy-tsai authored and alexandrebelloni committed Nov 18, 2024
1 parent 473d0cb commit 2b50719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i3c/master/mipi-i3c-hci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,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);
Expand Down

0 comments on commit 2b50719

Please sign in to comment.