net: dsa: microchip: ksz8: move BMCR specific code to separate function
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 24 Jan 2024 12:33:12 +0000 (13:33 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Jan 2024 05:25:24 +0000 (21:25 -0800)
commit0c657f860e675e051553c579669804d21da52364
tree4820a0e0db3e75a0ef01abc81dab0ab3840aaffa
parent92046e83c07b064ca65ac4ae7660a540016bdfc1
net: dsa: microchip: ksz8: move BMCR specific code to separate function

Isolate the Basic Mode Control Register (BMCR) operations in the ksz8795
driver by moving the BMCR-related code segments from the ksz8_r_phy()
and ksz8_w_phy() functions to newly created ksz8_r_phy_bmcr() and
ksz8_w_phy_bmcr() functions.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Link: https://lore.kernel.org/r/20240124123314.734815-2-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8795.c