net: phy: nxp-c45-tja11xx: simplify .match_phy_device OP
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 17 May 2025 20:13:47 +0000 (22:13 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 May 2025 22:56:09 +0000 (15:56 -0700)
commit1b76b2497aba90ce77a83b0af5943480fec5823f
tree8e46fe0fcd90613cbf237297cb4bc0b202d609d9
parent5253972cb9555c81fd021d4d61d95733fd25ee5b
net: phy: nxp-c45-tja11xx: simplify .match_phy_device OP

Simplify .match_phy_device OP by using a generic function and using the
new phy_id PHY driver info instead of hardcoding the matching PHY ID
with new variant for macsec and no_macsec PHYs.

Also make use of PHY_ID_MATCH_MODEL macro and drop PHY_ID_MASK define to
introduce phy_id and phy_id_mask again in phy_driver struct.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://patch.msgid.link/20250517201353.5137-4-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/nxp-c45-tja11xx.c