diff options
author | 2019-11-04 15:37:13 +0100 | |
---|---|---|
committer | 2020-01-08 12:48:47 +0530 | |
commit | 987351e1ea7772cf2f0795e917fb33b2e282e1c1 (patch) | |
tree | 2a5fff9f6ba5160673294c4bb0421df7d874baeb /include/linux/phy | |
parent | phy: ti-pipe3: make clk operations symmetric in probe and remove (diff) | |
download | linux-987351e1ea7772cf2f0795e917fb33b2e282e1c1.tar.gz linux-987351e1ea7772cf2f0795e917fb33b2e282e1c1.tar.bz2 linux-987351e1ea7772cf2f0795e917fb33b2e282e1c1.zip |
phy: core: Add consumer device link support
In order to enforce suspend/resume ordering, this commit creates link
between phy consumers and phy devices. This link avoids to suspend phy
before phy consumers.
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
[jonathanh@nvidia.com: Fix an abort when of_phy_get() returns error]
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy')
-rw-r--r-- | include/linux/phy/phy.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 56d3a100006a..19eddd64c8f6 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -234,7 +234,8 @@ struct phy *devm_of_phy_get(struct device *dev, struct device_node *np, const char *con_id); struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np, int index); -void phy_put(struct phy *phy); +void of_phy_put(struct phy *phy); +void phy_put(struct device *dev, struct phy *phy); void devm_phy_put(struct device *dev, struct phy *phy); struct phy *of_phy_get(struct device_node *np, const char *con_id); struct phy *of_phy_simple_xlate(struct device *dev, @@ -419,7 +420,11 @@ static inline struct phy *devm_of_phy_get_by_index(struct device *dev, return ERR_PTR(-ENOSYS); } -static inline void phy_put(struct phy *phy) +static inline void of_phy_put(struct phy *phy) +{ +} + +static inline void phy_put(struct device *dev, struct phy *phy) { } |