net: phy: Allow pre-declaration of MDIO devices
Allow board support code to collect pre-declarations for MDIO devices by registering them with mdiobus_register_board_info(). SPI and I2C buses have a similar feature, we were missing this for MDIO devices, but this is particularly useful for e.g: MDIO-connected switches which need to provide their port layout (often board-specific) to a MDIO Ethernet switch driver. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
71e0bbde0d
commit
648ea01340
19
drivers/net/phy/mdio-boardinfo.h
Normal file
19
drivers/net/phy/mdio-boardinfo.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* mdio-boardinfo.h - board info interface internal to the mdio_bus
|
||||
* component
|
||||
*/
|
||||
|
||||
#ifndef __MDIO_BOARD_INFO_H
|
||||
#define __MDIO_BOARD_INFO_H
|
||||
|
||||
#include <linux/phy.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
struct mdio_board_entry {
|
||||
struct list_head list;
|
||||
struct mdio_board_info board_info;
|
||||
};
|
||||
|
||||
void mdiobus_setup_mdiodev_from_board_info(struct mii_bus *bus);
|
||||
|
||||
#endif /* __MDIO_BOARD_INFO_H */
|
Reference in New Issue
Block a user