Lines Matching refs:newdev
1877 struct i3c_dev_desc *newdev, *olddev; in i3c_master_add_i3c_dev_locked() local
1886 newdev = i3c_master_alloc_i3c_dev(master, &info); in i3c_master_add_i3c_dev_locked()
1887 if (IS_ERR(newdev)) in i3c_master_add_i3c_dev_locked()
1888 return PTR_ERR(newdev); in i3c_master_add_i3c_dev_locked()
1890 ret = i3c_master_attach_i3c_dev(master, newdev); in i3c_master_add_i3c_dev_locked()
1894 ret = i3c_master_retrieve_dev_info(newdev); in i3c_master_add_i3c_dev_locked()
1898 i3c_master_attach_boardinfo(newdev); in i3c_master_add_i3c_dev_locked()
1900 olddev = i3c_master_search_i3c_dev_duplicate(newdev); in i3c_master_add_i3c_dev_locked()
1902 newdev->dev = olddev->dev; in i3c_master_add_i3c_dev_locked()
1903 if (newdev->dev) in i3c_master_add_i3c_dev_locked()
1904 newdev->dev->desc = newdev; in i3c_master_add_i3c_dev_locked()
1943 if (old_dyn_addr && old_dyn_addr != newdev->info.dyn_addr) in i3c_master_add_i3c_dev_locked()
1945 else if (newdev->boardinfo && newdev->boardinfo->init_dyn_addr) in i3c_master_add_i3c_dev_locked()
1946 expected_dyn_addr = newdev->boardinfo->init_dyn_addr; in i3c_master_add_i3c_dev_locked()
1948 expected_dyn_addr = newdev->info.dyn_addr; in i3c_master_add_i3c_dev_locked()
1950 if (newdev->info.dyn_addr != expected_dyn_addr) { in i3c_master_add_i3c_dev_locked()
1956 newdev->info.dyn_addr, in i3c_master_add_i3c_dev_locked()
1959 old_dyn_addr = newdev->info.dyn_addr; in i3c_master_add_i3c_dev_locked()
1960 newdev->info.dyn_addr = expected_dyn_addr; in i3c_master_add_i3c_dev_locked()
1961 i3c_master_reattach_i3c_dev(newdev, old_dyn_addr); in i3c_master_add_i3c_dev_locked()
1965 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1977 mutex_lock(&newdev->ibi_lock); in i3c_master_add_i3c_dev_locked()
1978 ret = i3c_dev_request_ibi_locked(newdev, &ibireq); in i3c_master_add_i3c_dev_locked()
1982 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1984 ret = i3c_dev_enable_ibi_locked(newdev); in i3c_master_add_i3c_dev_locked()
1988 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1990 mutex_unlock(&newdev->ibi_lock); in i3c_master_add_i3c_dev_locked()
1996 if (newdev->dev && newdev->dev->desc) in i3c_master_add_i3c_dev_locked()
1997 newdev->dev->desc = NULL; in i3c_master_add_i3c_dev_locked()
1999 i3c_master_detach_i3c_dev(newdev); in i3c_master_add_i3c_dev_locked()
2002 i3c_master_free_i3c_dev(newdev); in i3c_master_add_i3c_dev_locked()