mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
of_mdio: Abstract a general interface for phy connect
Abstract a general interface "of_phy_get_and_connect" for PHY connect. User will have no bother with getting "phy-mode" and "phy-handle" any more. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Reviewed-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4960e4b1e6
commit
b786241253
2 changed files with 46 additions and 0 deletions
|
@ -19,6 +19,9 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
|
|||
struct device_node *phy_np,
|
||||
void (*hndlr)(struct net_device *),
|
||||
u32 flags, phy_interface_t iface);
|
||||
extern struct phy_device *
|
||||
of_phy_get_and_connect(struct net_device *dev, struct device_node *np,
|
||||
void (*hndlr)(struct net_device *));
|
||||
struct phy_device *of_phy_attach(struct net_device *dev,
|
||||
struct device_node *phy_np, u32 flags,
|
||||
phy_interface_t iface);
|
||||
|
@ -52,6 +55,13 @@ static inline struct phy_device *of_phy_connect(struct net_device *dev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct phy_device *
|
||||
of_phy_get_and_connect(struct net_device *dev, struct device_node *np,
|
||||
void (*hndlr)(struct net_device *))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct phy_device *of_phy_attach(struct net_device *dev,
|
||||
struct device_node *phy_np,
|
||||
u32 flags, phy_interface_t iface)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue