Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
of_mdio.c File Reference
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/netdevice.h>
#include <linux/err.h>
#include <linux/phy.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_mdio.h>
#include <linux/module.h>

Go to the source code of this file.

Functions

 MODULE_AUTHOR ("Grant Likely <grant.likely@secretlab.ca>")
 
 MODULE_LICENSE ("GPL")
 
int of_mdiobus_register (struct mii_bus *mdio, struct device_node *np)
 
 EXPORT_SYMBOL (of_mdiobus_register)
 
struct phy_deviceof_phy_find_device (struct device_node *phy_np)
 
 EXPORT_SYMBOL (of_phy_find_device)
 
struct phy_deviceof_phy_connect (struct net_device *dev, struct device_node *phy_np, void(*hndlr)(struct net_device *), u32 flags, phy_interface_t iface)
 
 EXPORT_SYMBOL (of_phy_connect)
 
struct phy_deviceof_phy_connect_fixed_link (struct net_device *dev, void(*hndlr)(struct net_device *), phy_interface_t iface)
 
 EXPORT_SYMBOL (of_phy_connect_fixed_link)
 

Function Documentation

EXPORT_SYMBOL ( of_mdiobus_register  )
EXPORT_SYMBOL ( of_phy_find_device  )
EXPORT_SYMBOL ( of_phy_connect  )
EXPORT_SYMBOL ( of_phy_connect_fixed_link  )
MODULE_AUTHOR ( "Grant Likely <grant.likely@secretlab.ca>"  )
MODULE_LICENSE ( "GPL"  )
int of_mdiobus_register ( struct mii_bus mdio,
struct device_node np 
)

of_mdiobus_register - Register mii_bus and create PHYs from the device tree : pointer to mii_bus structure : pointer to device_node of MDIO bus.

This function registers the mii_bus structure and registers a phy_device for each child node of .

Definition at line 33 of file of_mdio.c.

struct phy_device* of_phy_connect ( struct net_device dev,
struct device_node phy_np,
void(*)(struct net_device *)  hndlr,
u32  flags,
phy_interface_t  iface 
)
read

of_phy_connect - Connect to the phy described in the device tree : pointer to net_device claiming the phy : Pointer to device tree node for the PHY : Link state callback for the network device : PHY data interface type

Returns a pointer to the phy_device if successful. NULL otherwise

Definition at line 150 of file of_mdio.c.

struct phy_device* of_phy_connect_fixed_link ( struct net_device dev,
void(*)(struct net_device *)  hndlr,
phy_interface_t  iface 
)
read

of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy : pointer to net_device claiming the phy : Link state callback for the network device : PHY data interface type

This function is a temporary stop-gap and will be removed soon. It is only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do not call this function from new drivers.

Definition at line 174 of file of_mdio.c.

struct phy_device* of_phy_find_device ( struct device_node phy_np)
read

of_phy_find_device - Give a PHY node, find the phy_device : Pointer to the phy's device tree node

Returns a pointer to the phy_device.

Definition at line 130 of file of_mdio.c.