net: phy: make phy_(read|write)_mmd() generic MMD accessors
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 21 Mar 2017 16:36:43 +0000 (16:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 19:43:00 +0000 (12:43 -0700)
commit1ee6b9bc6206cd0837bc16e46f580e40fe663384
tree5befdd9e0305a6157e2520f8ded5e90e1161d9bf
parent9860118b58241169f67ba77dfeb935fcf53ce4cd
net: phy: make phy_(read|write)_mmd() generic MMD accessors

Make phy_(read|write)_mmd() generic 802.3 clause 45 register accessors
for both Clause 22 and Clause 45 PHYs, using either the direct register
reading for Clause 45, or the indirect method for Clause 22 PHYs.
Allow this behaviour to be overriden by PHY drivers where necessary.

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