summaryrefslogtreecommitdiff
path: root/include/linux/pcs
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-05-26 13:14:29 +0300
committerJakub Kicinski <kuba@kernel.org>2023-05-30 07:46:53 +0300
commit9a5d500cffdb3652215172b7c5829ca7b41e9efe (patch)
tree2b596ce0628da31fc5032cb92e945e82ff2aa304 /include/linux/pcs
parentc4933fa88a68c69205753601044949d516c4db10 (diff)
downloadlinux-9a5d500cffdb3652215172b7c5829ca7b41e9efe.tar.xz
net: pcs: xpcs: add xpcs_create_mdiodev()
Add xpcs_create_mdiodev() to simplify the creation of the mdio device associated with the XPCS. In order to allow xpcs_destroy() to clean this up, we need to arrange for xpcs_create() to take a refcount on the mdiodev, and xpcs_destroy() to put it. Adding the refcounting to xpcs_create()..xpcs_destroy() will be transparent to existing users of these interfaces. 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/pcs')
-rw-r--r--include/linux/pcs/pcs-xpcs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pcs/pcs-xpcs.h b/include/linux/pcs/pcs-xpcs.h
index d2da1e0b4a92..a99972a6d046 100644
--- a/include/linux/pcs/pcs-xpcs.h
+++ b/include/linux/pcs/pcs-xpcs.h
@@ -37,6 +37,8 @@ int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns,
int enable);
struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev,
phy_interface_t interface);
+struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr,
+ phy_interface_t interface);
void xpcs_destroy(struct dw_xpcs *xpcs);
#endif /* __LINUX_PCS_XPCS_H */