/* Program Retaining Registers with device lists. 
This will program the retaining register with the controller itself */
static void cdns_i3c_program_controller_retaining_reg(const struct device *dev)
/* Program Retaining Registers with device lists. 
This will program the retaining register with the controller itself */
static void cdns_i3c_program_controller_retaining_reg(const struct device *dev)
{
	const struct cdns_i3c_config *config = dev->config;
	struct cdns_i3c_data *data = dev->data;
	uint8_t controller_da = I3C_CONTROLLER_ADDR;
	if (!i3c_addr_slots_is_free(&data->common.attached_dev.addr_slots, controller_da)) {
		controller_da =
			i3c_addr_slots_next_free_find(&data->common.attached_dev.addr_slots, 0);
		LOG_DBG("%s: 0x%02x DA selected for controller", dev->name, controller_da);
	}
	sys_write32(prepare_rr0_dev_address(controller_da), config->base + DEV_ID_RR0(0));
	i3c_addr_slots_mark_i3c(&data->common.attached_dev.addr_slots, controller_da);
}