• David Daney's avatar
    netdev/phy/of: Add more methods for binding PHY devices to drivers. · a30e2c18
    David Daney authored
    Allow PHY drivers to supply their own device matching function
    (match_phy_device()), or to be matched OF compatible properties.
    
    PHYs following IEEE802.3 clause 45 have more than one device
    identifier constants, which breaks the default device matching code.
    Other 10G PHYs don't follow the standard manufacturer/device
    identifier register layout standards, but they do use the standard
    MDIO bus protocols for register access.  Both of these require
    adjustments to the PHY driver to device matching code.
    
    If the there is an of_node associated with such a PHY, we can match it
    to its driver using the "compatible" properties, just as we do with
    certain platform devices.  If the "compatible" property match fails,
    first check if there is a driver supplied matching function, and if
    not fall back to the existing identifier matching rules.
    Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a30e2c18
mdio_bus.c 10.2 KB