diff options
author | Kamil Debski <k.debski@samsung.com> | 2014-03-06 06:16:46 -0500 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2014-03-08 02:09:42 -0500 |
commit | 0b3f3b2c777a2f7d20c9826a190ffd5bbd288f8f (patch) | |
tree | 213999b4bc559b470a3e02da6a899c67a03e2b4a /include/linux/phy/phy.h | |
parent | 6284be23db6b32e17ef34d082386967350d10d1a (diff) |
phy: core: Add an exported of_phy_get function
Previously the of_phy_get function took a struct device * and
was declared static. It was impossible to call it from
another driver and thus it was impossible to get phy defined
for a given node. The old function was renamed to _of_phy_get
and was left for internal use. of_phy_get function was added
and it was exported. The function enables to get a phy for
a given device tree node.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy/phy.h')
-rw-r--r-- | include/linux/phy/phy.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 3f83459dbb20..50c7629b5860 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
@@ -151,6 +151,7 @@ struct phy *devm_phy_get(struct device *dev, const char *string); | |||
151 | struct phy *devm_phy_optional_get(struct device *dev, const char *string); | 151 | struct phy *devm_phy_optional_get(struct device *dev, const char *string); |
152 | void phy_put(struct phy *phy); | 152 | void phy_put(struct phy *phy); |
153 | void devm_phy_put(struct device *dev, struct phy *phy); | 153 | void devm_phy_put(struct device *dev, struct phy *phy); |
154 | struct phy *of_phy_get(struct device_node *np, const char *con_id); | ||
154 | struct phy *of_phy_simple_xlate(struct device *dev, | 155 | struct phy *of_phy_simple_xlate(struct device *dev, |
155 | struct of_phandle_args *args); | 156 | struct of_phandle_args *args); |
156 | struct phy *phy_create(struct device *dev, const struct phy_ops *ops, | 157 | struct phy *phy_create(struct device *dev, const struct phy_ops *ops, |
@@ -259,6 +260,11 @@ static inline void devm_phy_put(struct device *dev, struct phy *phy) | |||
259 | { | 260 | { |
260 | } | 261 | } |
261 | 262 | ||
263 | static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) | ||
264 | { | ||
265 | return ERR_PTR(-ENOSYS); | ||
266 | } | ||
267 | |||
262 | static inline struct phy *of_phy_simple_xlate(struct device *dev, | 268 | static inline struct phy *of_phy_simple_xlate(struct device *dev, |
263 | struct of_phandle_args *args) | 269 | struct of_phandle_args *args) |
264 | { | 270 | { |