Lines Matching refs:phy
28 struct usb_phy *phy = NULL; in __usb_find_phy() local
30 list_for_each_entry(phy, list, head) { in __usb_find_phy()
31 if (phy->type != type) in __usb_find_phy()
34 return phy; in __usb_find_phy()
48 if (phy_bind->phy) in __usb_find_phy_dev()
49 return phy_bind->phy; in __usb_find_phy_dev()
60 struct usb_phy *phy; in __of_usb_find_phy() local
62 list_for_each_entry(phy, &phy_list, head) { in __of_usb_find_phy()
63 if (node != phy->dev->of_node) in __of_usb_find_phy()
66 return phy; in __of_usb_find_phy()
74 struct usb_phy *phy = *(struct usb_phy **)res; in devm_usb_phy_release() local
76 usb_put_phy(phy); in devm_usb_phy_release()
97 struct usb_phy **ptr, *phy; in devm_usb_get_phy() local
103 phy = usb_get_phy(type); in devm_usb_get_phy()
104 if (!IS_ERR(phy)) { in devm_usb_get_phy()
105 *ptr = phy; in devm_usb_get_phy()
110 return phy; in devm_usb_get_phy()
126 struct usb_phy *phy = NULL; in usb_get_phy() local
131 phy = __usb_find_phy(&phy_list, type); in usb_get_phy()
132 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { in usb_get_phy()
138 get_device(phy->dev); in usb_get_phy()
143 return phy; in usb_get_phy()
165 struct usb_phy *phy = ERR_PTR(-ENOMEM), **ptr; in devm_usb_get_phy_by_phandle() local
189 phy = __of_usb_find_phy(node); in devm_usb_get_phy_by_phandle()
190 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { in devm_usb_get_phy_by_phandle()
191 phy = ERR_PTR(-EPROBE_DEFER); in devm_usb_get_phy_by_phandle()
196 *ptr = phy; in devm_usb_get_phy_by_phandle()
199 get_device(phy->dev); in devm_usb_get_phy_by_phandle()
207 return phy; in devm_usb_get_phy_by_phandle()
224 struct usb_phy *phy = NULL; in usb_get_phy_dev() local
229 phy = __usb_find_phy_dev(dev, &phy_bind_list, index); in usb_get_phy_dev()
230 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { in usb_get_phy_dev()
235 get_device(phy->dev); in usb_get_phy_dev()
240 return phy; in usb_get_phy_dev()
257 struct usb_phy **ptr, *phy; in devm_usb_get_phy_dev() local
263 phy = usb_get_phy_dev(dev, index); in devm_usb_get_phy_dev()
264 if (!IS_ERR(phy)) { in devm_usb_get_phy_dev()
265 *ptr = phy; in devm_usb_get_phy_dev()
270 return phy; in devm_usb_get_phy_dev()
284 void devm_usb_put_phy(struct device *dev, struct usb_phy *phy) in devm_usb_put_phy() argument
288 r = devres_destroy(dev, devm_usb_phy_release, devm_usb_phy_match, phy); in devm_usb_put_phy()
325 struct usb_phy *phy; in usb_add_phy() local
334 list_for_each_entry(phy, &phy_list, head) { in usb_add_phy()
335 if (phy->type == type) { in usb_add_phy()
373 phy_bind->phy = x; in usb_add_phy_dev()
396 if (phy_bind->phy == x) in usb_remove_phy()
397 phy_bind->phy = NULL; in usb_remove_phy()