mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
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>
This commit is contained in:
parent
2a4c37016c
commit
f0ed817638
18 changed files with 52 additions and 31 deletions
|
@ -158,9 +158,10 @@ 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,
|
||||
struct of_phandle_args *args);
|
||||
struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data);
|
||||
struct phy *devm_phy_create(struct device *dev,
|
||||
struct phy *phy_create(struct device *dev, struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data);
|
||||
struct phy *devm_phy_create(struct device *dev, struct device_node *node,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data);
|
||||
void phy_destroy(struct phy *phy);
|
||||
void devm_phy_destroy(struct device *dev, struct phy *phy);
|
||||
|
@ -299,13 +300,17 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev,
|
|||
}
|
||||
|
||||
static inline struct phy *phy_create(struct device *dev,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data)
|
||||
struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline struct phy *devm_phy_create(struct device *dev,
|
||||
const struct phy_ops *ops, struct phy_init_data *init_data)
|
||||
struct device_node *node,
|
||||
const struct phy_ops *ops,
|
||||
struct phy_init_data *init_data)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue