• Carlo Caione's avatar
    net: phy: Add generic helpers to access MMD PHY registers · 4f6746dc
    Carlo Caione authored
    Two new helper functions (phy_read_mmd() and phy_write_mmd()) are added
    to allow access to the MMD PHY registers.
    The MMD PHY registers can be accessed by several means:
    1. Using two new MMD access function hooks in the PHY driver. These
    functions can be implemented when the PHY driver does not support the
    standard IEEE Compatible clause 45 access mechanism described in clause
    22 or if the PHY uses its own non-standard access mechanism.
    2. Direct access for C45 PHYs and C22 PHYs when accessing the reachable
    3. The standard clause 45 access extensions to the MMD registers through
    the indirection registers (clause 22) in all the other cases.
    Signed-off-by: default avatarCarlo Caione <ccaione@baylibre.com>
    Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>