Name

of_phy_connect — Connect to the phy described in the device tree

Synopsis

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);
 

Arguments

dev

pointer to net_device claiming the phy

phy_np

Pointer to device tree node for the PHY

hndlr

Link state callback for the network device

flags

flags to pass to the PHY

iface

PHY data interface type

Description

If successful, returns a pointer to the phy_device with the embedded struct device refcount incremented by one, or NULL on failure. The refcount must be dropped by calling phy_disconnect or phy_detach.