net: phy: add support for PHY package MMD read/write
authorChristian Marangi <ansuelsmth@gmail.com>
Fri, 15 Dec 2023 13:15:34 +0000 (14:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Dec 2023 20:10:07 +0000 (20:10 +0000)
commitd63710fc0f1a501fd75a7025e3070a96ffa1645f
treee38475640e5cd1259c4fce85eb290578bc0b7b00
parent028672bd1d73cf65249a420c1de75e8d2acd2f6a
net: phy: add support for PHY package MMD read/write

Some PHY in PHY package may require to read/write MMD regs to correctly
configure the PHY package.

Add support for these additional required function in both lock and no
lock variant.

It's assumed that the entire PHY package is either C22 or C45. We use
C22 or C45 way of writing/reading to mmd regs based on the passed phydev
whether it's C22 or C45.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c
include/linux/phy.h