Lines Matching full:phy_provider
44 struct phy_provider *phy_provider = *(struct phy_provider **)res; in devm_phy_provider_release() local
46 of_phy_provider_unregister(phy_provider); in devm_phy_provider_release()
138 static struct phy_provider *of_phy_provider_lookup(struct device_node *node) in of_phy_provider_lookup()
140 struct phy_provider *phy_provider; in of_phy_provider_lookup() local
142 list_for_each_entry(phy_provider, &phy_provider_list, list) { in of_phy_provider_lookup()
143 if (phy_provider->dev->of_node == node) in of_phy_provider_lookup()
144 return phy_provider; in of_phy_provider_lookup()
146 for_each_child_of_node_scoped(phy_provider->children, child) in of_phy_provider_lookup()
148 return phy_provider; in of_phy_provider_lookup()
618 * while registering the phy_provider to find the phy instance.
623 struct phy_provider *phy_provider; in _of_phy_get() local
639 phy_provider = of_phy_provider_lookup(args.np); in _of_phy_get()
640 if (IS_ERR(phy_provider) || !try_module_get(phy_provider->owner)) { in _of_phy_get()
646 dev_warn(phy_provider->dev, "Requested PHY is disabled\n"); in _of_phy_get()
651 phy = phy_provider->of_xlate(phy_provider->dev, &args); in _of_phy_get()
654 module_put(phy_provider->owner); in _of_phy_get()
1134 * Creates struct phy_provider from dev and of_xlate function pointer.
1145 struct phy_provider *__of_phy_provider_register(struct device *dev, in __of_phy_provider_register()
1150 struct phy_provider *phy_provider; in __of_phy_provider_register() local
1177 phy_provider = kzalloc_obj(*phy_provider); in __of_phy_provider_register()
1178 if (!phy_provider) in __of_phy_provider_register()
1181 phy_provider->dev = dev; in __of_phy_provider_register()
1182 phy_provider->children = of_node_get(children); in __of_phy_provider_register()
1183 phy_provider->owner = owner; in __of_phy_provider_register()
1184 phy_provider->of_xlate = of_xlate; in __of_phy_provider_register()
1187 list_add_tail(&phy_provider->list, &phy_provider_list); in __of_phy_provider_register()
1190 return phy_provider; in __of_phy_provider_register()
1202 * Creates struct phy_provider from dev and of_xlate function pointer.
1208 struct phy_provider *__devm_of_phy_provider_register(struct device *dev, in __devm_of_phy_provider_register()
1213 struct phy_provider **ptr, *phy_provider; in __devm_of_phy_provider_register() local
1219 phy_provider = __of_phy_provider_register(dev, children, owner, in __devm_of_phy_provider_register()
1221 if (!IS_ERR(phy_provider)) { in __devm_of_phy_provider_register()
1222 *ptr = phy_provider; in __devm_of_phy_provider_register()
1228 return phy_provider; in __devm_of_phy_provider_register()
1234 * @phy_provider: phy provider returned by of_phy_provider_register()
1236 * Removes the phy_provider created using of_phy_provider_register().
1238 void of_phy_provider_unregister(struct phy_provider *phy_provider) in of_phy_provider_unregister() argument
1240 if (IS_ERR(phy_provider)) in of_phy_provider_unregister()
1244 list_del(&phy_provider->list); in of_phy_provider_unregister()
1245 of_node_put(phy_provider->children); in of_phy_provider_unregister()
1246 kfree(phy_provider); in of_phy_provider_unregister()
1254 * @phy_provider: phy provider returned by of_phy_provider_register()
1260 struct phy_provider *phy_provider) in devm_of_phy_provider_unregister() argument
1265 phy_provider); in devm_of_phy_provider_unregister()