Lines Matching refs:phy_provider
37 struct phy_provider *phy_provider = *(struct phy_provider **)res; in devm_phy_provider_release() local
39 of_phy_provider_unregister(phy_provider); in devm_phy_provider_release()
131 static struct phy_provider *of_phy_provider_lookup(struct device_node *node) in of_phy_provider_lookup()
133 struct phy_provider *phy_provider; in of_phy_provider_lookup() local
136 list_for_each_entry(phy_provider, &phy_provider_list, list) { in of_phy_provider_lookup()
137 if (phy_provider->dev->of_node == node) in of_phy_provider_lookup()
138 return phy_provider; in of_phy_provider_lookup()
140 for_each_child_of_node(phy_provider->children, child) in of_phy_provider_lookup()
142 return phy_provider; in of_phy_provider_lookup()
568 struct phy_provider *phy_provider; in _of_phy_get() local
582 phy_provider = of_phy_provider_lookup(args.np); in _of_phy_get()
583 if (IS_ERR(phy_provider) || !try_module_get(phy_provider->owner)) { in _of_phy_get()
589 dev_warn(phy_provider->dev, "Requested PHY is disabled\n"); in _of_phy_get()
594 phy = phy_provider->of_xlate(phy_provider->dev, &args); in _of_phy_get()
597 module_put(phy_provider->owner); in _of_phy_get()
1082 struct phy_provider *__of_phy_provider_register(struct device *dev, in __of_phy_provider_register()
1087 struct phy_provider *phy_provider; in __of_phy_provider_register() local
1114 phy_provider = kzalloc(sizeof(*phy_provider), GFP_KERNEL); in __of_phy_provider_register()
1115 if (!phy_provider) in __of_phy_provider_register()
1118 phy_provider->dev = dev; in __of_phy_provider_register()
1119 phy_provider->children = of_node_get(children); in __of_phy_provider_register()
1120 phy_provider->owner = owner; in __of_phy_provider_register()
1121 phy_provider->of_xlate = of_xlate; in __of_phy_provider_register()
1124 list_add_tail(&phy_provider->list, &phy_provider_list); in __of_phy_provider_register()
1127 return phy_provider; in __of_phy_provider_register()
1145 struct phy_provider *__devm_of_phy_provider_register(struct device *dev, in __devm_of_phy_provider_register()
1150 struct phy_provider **ptr, *phy_provider; in __devm_of_phy_provider_register() local
1156 phy_provider = __of_phy_provider_register(dev, children, owner, in __devm_of_phy_provider_register()
1158 if (!IS_ERR(phy_provider)) { in __devm_of_phy_provider_register()
1159 *ptr = phy_provider; in __devm_of_phy_provider_register()
1165 return phy_provider; in __devm_of_phy_provider_register()
1175 void of_phy_provider_unregister(struct phy_provider *phy_provider) in of_phy_provider_unregister() argument
1177 if (IS_ERR(phy_provider)) in of_phy_provider_unregister()
1181 list_del(&phy_provider->list); in of_phy_provider_unregister()
1182 of_node_put(phy_provider->children); in of_phy_provider_unregister()
1183 kfree(phy_provider); in of_phy_provider_unregister()
1197 struct phy_provider *phy_provider) in devm_of_phy_provider_unregister() argument
1202 phy_provider); in devm_of_phy_provider_unregister()