summaryrefslogtreecommitdiffstats
path: root/include/linux/mdio-bitbang.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2023-01-09 16:30:46 +0100
committerJakub Kicinski <kuba@kernel.org>2023-01-10 15:53:36 -0800
commit002dd3de097c778a74ae9e47e598bea6ad055af0 (patch)
tree5f953f0df072fe3f4dc485a6ce13cdb4dc3cad6b /include/linux/mdio-bitbang.h
parentce30fa56cbf09ab6b28170ced689c3cfd329e979 (diff)
downloadlinux-stable-002dd3de097c778a74ae9e47e598bea6ad055af0.tar.gz
linux-stable-002dd3de097c778a74ae9e47e598bea6ad055af0.tar.bz2
linux-stable-002dd3de097c778a74ae9e47e598bea6ad055af0.zip
net: mdio: mdio-bitbang: Separate C22 and C45 transactions
The bitbbanging bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new driver API calls. The SH Ethernet driver places wrappers around these functions. In order to not break boards which might be using C45, add similar wrappers for C45 operations. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/mdio-bitbang.h')
-rw-r--r--include/linux/mdio-bitbang.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/mdio-bitbang.h b/include/linux/mdio-bitbang.h
index 373630fe5c28..cffabdbce075 100644
--- a/include/linux/mdio-bitbang.h
+++ b/include/linux/mdio-bitbang.h
@@ -38,8 +38,10 @@ struct mdiobb_ctrl {
u8 op_c22_write;
};
-int mdiobb_read(struct mii_bus *bus, int phy, int reg);
-int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val);
+int mdiobb_read_c22(struct mii_bus *bus, int phy, int reg);
+int mdiobb_write_c22(struct mii_bus *bus, int phy, int reg, u16 val);
+int mdiobb_read_c45(struct mii_bus *bus, int devad, int phy, int reg);
+int mdiobb_write_c45(struct mii_bus *bus, int devad, int phy, int reg, u16 val);
/* The returned bus is not yet registered with the phy layer. */
struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl);