aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2014-07-14 06:25:02 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2014-07-22 03:16:11 -0400
commitf0ed817638b59aa927f1f7e9564dd8796b18dc4f (patch)
tree8d33a1dc9b780a2413565d80a19b649b056fb4cd /include/linux/phy
parent2a4c37016ca96e413cd352985d3a0db8cfb7716c (diff)
phy: core: Let node ptr of PHY point to PHY and not of PHY provider
In case of multi-phy PHY providers, each PHY should be modeled as a sub node of the PHY provider. Then each PHY will have a different node pointer (node pointer of sub node) than that of PHY provider. Added this provision in the PHY core. Also fixed all drivers to use the updated API. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/phy')
-rw-r--r--include/linux/phy/phy.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 9a8694524742..8cb6f815475b 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -158,9 +158,10 @@ void devm_phy_put(struct device *dev, struct phy *phy);
158struct phy *of_phy_get(struct device_node *np, const char *con_id); 158struct phy *of_phy_get(struct device_node *np, const char *con_id);
159struct phy *of_phy_simple_xlate(struct device *dev, 159struct phy *of_phy_simple_xlate(struct device *dev,
160 struct of_phandle_args *args); 160 struct of_phandle_args *args);
161struct phy *phy_create(struct device *dev, const struct phy_ops *ops, 161struct phy *phy_create(struct device *dev, struct device_node *node,
162 struct phy_init_data *init_data); 162 const struct phy_ops *ops,
163struct phy *devm_phy_create(struct device *dev, 163 struct phy_init_data *init_data);
164struct phy *devm_phy_create(struct device *dev, struct device_node *node,
164 const struct phy_ops *ops, struct phy_init_data *init_data); 165 const struct phy_ops *ops, struct phy_init_data *init_data);
165void phy_destroy(struct phy *phy); 166void phy_destroy(struct phy *phy);
166void devm_phy_destroy(struct device *dev, struct phy *phy); 167void devm_phy_destroy(struct device *dev, struct phy *phy);
@@ -299,13 +300,17 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev,
299} 300}
300 301
301static inline struct phy *phy_create(struct device *dev, 302static inline struct phy *phy_create(struct device *dev,
302 const struct phy_ops *ops, struct phy_init_data *init_data) 303 struct device_node *node,
304 const struct phy_ops *ops,
305 struct phy_init_data *init_data)
303{ 306{
304 return ERR_PTR(-ENOSYS); 307 return ERR_PTR(-ENOSYS);
305} 308}
306 309
307static inline struct phy *devm_phy_create(struct device *dev, 310static inline struct phy *devm_phy_create(struct device *dev,
308 const struct phy_ops *ops, struct phy_init_data *init_data) 311 struct device_node *node,
312 const struct phy_ops *ops,
313 struct phy_init_data *init_data)
309{ 314{
310 return ERR_PTR(-ENOSYS); 315 return ERR_PTR(-ENOSYS);
311} 316}