net: rswitch: Add PHY C22 access support
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 20 Dec 2024 00:48:41 +0000 (01:48 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 29 Dec 2024 15:55:32 +0000 (16:55 +0100)
commit8bdc76b2c92e379b161dc7813da32f49357ad4ab
tree6ee9da784a702f47a9371ad668d8eb3b78383100
parentc3f0977ee6803a9e50803a081848b1f8066d6ded
net: rswitch: Add PHY C22 access support

Implement C22 PHY access support in addition to C45 PHY access
support which is already present. This is used for PHYs which
do not support C45 access or which are C22 only.

The C22 access can be recognized when devad is set to -1 or
0xffffffff hex, which also matches MDIO_DEVAD_NONE macro. Test
for this special devad value and if it is set this way, perform
C22 access, otherwise perform C45 access.

Based on work by LUU HOAI <hoai.luu.ub@renesas.com>

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/net/rswitch.c