net: phy: realtek: Add functions to read PHY's extended registers
authorCarlo Caione <ccaione@baylibre.com>
Wed, 16 Jan 2019 11:34:50 +0000 (11:34 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 24 Jan 2019 17:35:29 +0000 (11:35 -0600)
commite57c9fdb042741e4049661074c25e7b7ff8a68cc
treefc03aa1871597d175229e1aa37ebf79a1f16ed78
parent9043c4e0fc130aba5a1f4161885c9d97b5d8a73f
net: phy: realtek: Add functions to read PHY's extended registers

According to the datasheet to access the extended registers we have to:

1. Write Register 31 Data = 0x0XYZ (Page 0xXYZ)
2. Read/Write the target Register Data
3. Write Register 31 Data = 0x0000 or 0xa42 (switch back to IEEE
   Standard Registers)

Hook the missing functions so that we can use the `mdio rx/wx` command to
easily access the extended registers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/realtek.c