Lines Matching refs:newdev
1858 struct i3c_dev_desc *newdev, *olddev; in i3c_master_add_i3c_dev_locked() local
1867 newdev = i3c_master_alloc_i3c_dev(master, &info); in i3c_master_add_i3c_dev_locked()
1868 if (IS_ERR(newdev)) in i3c_master_add_i3c_dev_locked()
1869 return PTR_ERR(newdev); in i3c_master_add_i3c_dev_locked()
1871 ret = i3c_master_attach_i3c_dev(master, newdev); in i3c_master_add_i3c_dev_locked()
1875 ret = i3c_master_retrieve_dev_info(newdev); in i3c_master_add_i3c_dev_locked()
1879 i3c_master_attach_boardinfo(newdev); in i3c_master_add_i3c_dev_locked()
1881 olddev = i3c_master_search_i3c_dev_duplicate(newdev); in i3c_master_add_i3c_dev_locked()
1883 newdev->dev = olddev->dev; in i3c_master_add_i3c_dev_locked()
1884 if (newdev->dev) in i3c_master_add_i3c_dev_locked()
1885 newdev->dev->desc = newdev; in i3c_master_add_i3c_dev_locked()
1924 if (old_dyn_addr && old_dyn_addr != newdev->info.dyn_addr) in i3c_master_add_i3c_dev_locked()
1926 else if (newdev->boardinfo && newdev->boardinfo->init_dyn_addr) in i3c_master_add_i3c_dev_locked()
1927 expected_dyn_addr = newdev->boardinfo->init_dyn_addr; in i3c_master_add_i3c_dev_locked()
1929 expected_dyn_addr = newdev->info.dyn_addr; in i3c_master_add_i3c_dev_locked()
1931 if (newdev->info.dyn_addr != expected_dyn_addr) { in i3c_master_add_i3c_dev_locked()
1937 newdev->info.dyn_addr, in i3c_master_add_i3c_dev_locked()
1940 old_dyn_addr = newdev->info.dyn_addr; in i3c_master_add_i3c_dev_locked()
1941 newdev->info.dyn_addr = expected_dyn_addr; in i3c_master_add_i3c_dev_locked()
1942 i3c_master_reattach_i3c_dev(newdev, old_dyn_addr); in i3c_master_add_i3c_dev_locked()
1946 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1958 mutex_lock(&newdev->ibi_lock); in i3c_master_add_i3c_dev_locked()
1959 ret = i3c_dev_request_ibi_locked(newdev, &ibireq); in i3c_master_add_i3c_dev_locked()
1963 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1965 ret = i3c_dev_enable_ibi_locked(newdev); in i3c_master_add_i3c_dev_locked()
1969 master->bus.id, newdev->info.pid); in i3c_master_add_i3c_dev_locked()
1971 mutex_unlock(&newdev->ibi_lock); in i3c_master_add_i3c_dev_locked()
1977 if (newdev->dev && newdev->dev->desc) in i3c_master_add_i3c_dev_locked()
1978 newdev->dev->desc = NULL; in i3c_master_add_i3c_dev_locked()
1980 i3c_master_detach_i3c_dev(newdev); in i3c_master_add_i3c_dev_locked()
1983 i3c_master_free_i3c_dev(newdev); in i3c_master_add_i3c_dev_locked()