]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdiobus: add clause 45 mdiobus accessors
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 26 May 2020 15:29:36 +0000 (16:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2020 22:31:45 +0000 (15:31 -0700)
commit8594622dc4cbf585514c8c12eb17d7d7d931a7bf
tree2a47bbd8f8eeef4638694115ca06e66bda2c0da4
parentca28db7b7d0ce1cb0376d5c6bb7e86da8e7d0bb1
net: mdiobus: add clause 45 mdiobus accessors

There is a recurring pattern throughout some of the PHY code converting
a devad and regnum to our packed clause 45 representation. Rather than
having this scattered around the code, let's put a common translation
function in mdio.h, and provide some register accessors.

Convert the phylib core, phylink, bcm87xx and cortina to use these.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/bcm87xx.c
drivers/net/phy/cortina.c
drivers/net/phy/phy-core.c
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
drivers/net/phy/phylink.c
include/linux/mdio.h
include/linux/phy.h