diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-29 11:41:14 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-29 13:58:32 +0200 |
commit | 850557842f01ecb47b00ecb43b3bc3c8f1bb826f (patch) | |
tree | 5ed1eea35fe33e49c1513042cbe4b93522cd6bbf /include | |
parent | 4ed80f0643ce5c83ec8a5c5c9713ca7b1cb2f83a (diff) | |
download | barebox-850557842f01ecb47b00ecb43b3bc3c8f1bb826f.tar.gz barebox-850557842f01ecb47b00ecb43b3bc3c8f1bb826f.tar.xz |
phy: Introduce of_phy_get_by_phandle
Currently generic phy support assumes that the standard phy binding from
dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function
which can be used to retrieve a phy when this standard binding is not
used.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy/phy.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 94f0044036..0d78923358 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -136,6 +136,8 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width) } struct phy *phy_get(struct device_d *dev, const char *string); struct phy *phy_optional_get(struct device_d *dev, const char *string); +struct phy *of_phy_get_by_phandle(struct device_d *dev, const char *phandle, + u8 index); void phy_put(struct phy *phy); struct phy *of_phy_get(struct device_node *np, const char *con_id); struct phy *of_phy_simple_xlate(struct device_d *dev, @@ -198,6 +200,12 @@ static inline struct phy *phy_optional_get(struct device_d *dev, return ERR_PTR(-ENOSYS); } +static inline struct phy *of_phy_get_by_phandle(struct device_d *dev, + const char *phandle, u8 index) +{ + return ERR_PTR(-ENOSYS); +} + static inline void phy_put(struct phy *phy) { } |