Lines Matching full:desc
190 struct i3c_device_desc *desc = &dev_list->i3c[i]; in i3c_dev_list_find() local
192 if (desc->pid == id->pid) { in i3c_dev_list_find()
193 ret = desc; in i3c_dev_list_find()
205 struct i3c_device_desc *desc; in i3c_dev_list_i3c_addr_find() local
209 I3C_BUS_FOR_EACH_I3CDEV(dev, desc) { in i3c_dev_list_i3c_addr_find()
210 if (desc->dynamic_addr == addr) { in i3c_dev_list_i3c_addr_find()
211 ret = desc; in i3c_dev_list_i3c_addr_find()
223 struct i3c_i2c_device_desc *desc; in i3c_dev_list_i2c_addr_find() local
227 I3C_BUS_FOR_EACH_I2CDEV(dev, desc) { in i3c_dev_list_i2c_addr_find()
228 if (desc->addr == addr) { in i3c_dev_list_i2c_addr_find()
229 ret = desc; in i3c_dev_list_i2c_addr_find()
383 struct i3c_device_desc *desc; in i3c_dev_list_daa_addr_helper() local
390 desc = i3c_dev_list_find(dev_list, &i3c_id); in i3c_dev_list_daa_addr_helper()
391 if (must_match && (desc == NULL)) { in i3c_dev_list_daa_addr_helper()
404 if (desc != NULL && desc->dynamic_addr != 0U) { in i3c_dev_list_daa_addr_helper()
407 dyn_addr = desc->dynamic_addr; in i3c_dev_list_daa_addr_helper()
417 vendor_id, part_no, desc->dynamic_addr); in i3c_dev_list_daa_addr_helper()
427 if (desc != NULL && desc->init_dynamic_addr != 0U) { in i3c_dev_list_daa_addr_helper()
428 if (i3c_addr_slots_is_free(addr_slots, desc->init_dynamic_addr)) { in i3c_dev_list_daa_addr_helper()
429 dyn_addr = desc->init_dynamic_addr; in i3c_dev_list_daa_addr_helper()
447 *target = desc; in i3c_dev_list_daa_addr_helper()
561 struct i3c_device_desc *desc = &dev_list->i3c[i]; in i3c_bus_setdasa() local
569 if (desc->static_addr == 0U) { in i3c_bus_setdasa()
579 if ((desc->supports_setaasa) && ((desc->init_dynamic_addr == 0) || in i3c_bus_setdasa()
580 desc->init_dynamic_addr == desc->static_addr)) { in i3c_bus_setdasa()
585 LOG_DBG("SETDASA for 0x%x", desc->static_addr); in i3c_bus_setdasa()
591 if ((desc->init_dynamic_addr != 0) && in i3c_bus_setdasa()
592 (desc->init_dynamic_addr != desc->static_addr)) { in i3c_bus_setdasa()
594 desc->init_dynamic_addr)) { in i3c_bus_setdasa()
595 if (i3c_detach_i3c_device(desc) != 0) { in i3c_bus_setdasa()
596 LOG_ERR("Failed to detach %s", desc->dev->name); in i3c_bus_setdasa()
606 dyn_addr.addr = (desc->init_dynamic_addr ? in i3c_bus_setdasa()
607 desc->init_dynamic_addr : desc->static_addr) << 1; in i3c_bus_setdasa()
609 ret = i3c_ccc_do_setdasa(desc, dyn_addr); in i3c_bus_setdasa()
611 desc->dynamic_addr = dyn_addr.addr >> 1; in i3c_bus_setdasa()
612 if (desc->dynamic_addr != desc->static_addr) { in i3c_bus_setdasa()
613 if (i3c_reattach_i3c_device(desc, desc->static_addr) != 0) { in i3c_bus_setdasa()
614 LOG_ERR("Failed to reattach %s (%d)", desc->dev->name, ret); in i3c_bus_setdasa()
619 if (i3c_detach_i3c_device(desc) != 0) { in i3c_bus_setdasa()
620 LOG_ERR("Failed to detach %s (%d)", desc->dev->name, ret); in i3c_bus_setdasa()
623 desc->static_addr, ret); in i3c_bus_setdasa()
779 struct i3c_device_desc *desc = &dev_list->i3c[i]; in i3c_bus_init() local
784 if ((desc->supports_setaasa) && (desc->static_addr != 0) && in i3c_bus_init()
785 ((desc->init_dynamic_addr == 0) || in i3c_bus_init()
786 desc->init_dynamic_addr == desc->static_addr)) { in i3c_bus_init()
787 desc->dynamic_addr = desc->static_addr; in i3c_bus_init()
821 struct i3c_device_desc *desc = &dev_list->i3c[i]; in i3c_bus_init() local
823 if (desc->dynamic_addr == 0U) { in i3c_bus_init()
827 ret = i3c_device_basic_info_get(desc); in i3c_bus_init()
830 desc->static_addr); in i3c_bus_init()
833 desc->dynamic_addr, desc->bcr, desc->dcr, in i3c_bus_init()
834 desc->data_length.mrl, desc->data_length.mwl, in i3c_bus_init()
835 desc->data_length.max_ibi); in i3c_bus_init()