mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
phy: Add an mdio_device structure
Not all devices attached to an MDIO bus are phys. So add an mdio_device structure to represent the generic parts of an mdio device, and place this structure into the phy_device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e7f4dc3536
commit
e5a03bfd87
@@ -13,6 +13,15 @@
|
||||
|
||||
struct mii_bus;
|
||||
|
||||
struct mdio_device {
|
||||
struct device dev;
|
||||
|
||||
struct mii_bus *bus;
|
||||
/* Bus address of the MDIO device (0-31) */
|
||||
int addr;
|
||||
};
|
||||
#define to_mdio_device(d) container_of(d, struct mdio_device, dev)
|
||||
|
||||
static inline bool mdio_phy_id_is_c45(int phy_id)
|
||||
{
|
||||
return (phy_id & MDIO_PHY_ID_C45) && !(phy_id & ~MDIO_PHY_ID_C45_MASK);
|
||||
|
||||
Reference in New Issue
Block a user