diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-11-08 17:25:56 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-10 06:28:49 +0300 |
commit | f6479ea4e5990e17b9690d66474198dcdba1b2c1 (patch) | |
tree | 3b4c92a59ca0c8fdbf3f54f97edb4a97c30e1233 /include/linux/mdio.h | |
parent | 21780f89d65837e23fef825c79aa836c1cb3a8e9 (diff) | |
download | linux-f6479ea4e5990e17b9690d66474198dcdba1b2c1.tar.xz |
net: mdio: add mdiodev_c45_(read|write)
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/mdio.h')
-rw-r--r-- | include/linux/mdio.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 00177567cfef..f7fbbf3069e7 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -488,6 +488,19 @@ static inline int mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad, return mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum), val); } +static inline int mdiodev_c45_read(struct mdio_device *mdiodev, int devad, + u16 regnum) +{ + return mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum); +} + +static inline int mdiodev_c45_write(struct mdio_device *mdiodev, u32 devad, + u16 regnum, u16 val) +{ + return mdiobus_c45_write(mdiodev->bus, mdiodev->addr, devad, regnum, + val); +} + int mdiobus_register_device(struct mdio_device *mdiodev); int mdiobus_unregister_device(struct mdio_device *mdiodev); bool mdiobus_is_registered_device(struct mii_bus *bus, int addr); |