summaryrefslogtreecommitdiff
path: root/include/linux/pcs
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2024-07-01 21:28:39 +0300
committerDavid S. Miller <davem@davemloft.net>2024-07-05 09:35:51 +0100
commit9cad7275463ab9e52aeae8d2ecb169afee6876f3 (patch)
treeb63233e4343f3a62b8acddf06d850567205cba5c /include/linux/pcs
parentf6bb3e9d98c2e8d70587d5ddaf9426ef30d7865c (diff)
net: pcs: xpcs: Add fwnode-based descriptor creation method
It's now possible to have the DW XPCS device defined as a standard platform device for instance in the platform DT-file. Although that functionality is useless unless there is a way to have the device found by the client drivers (STMMAC/DW *MAC, NXP SJA1105 Eth Switch, etc). Provide such ability by means of the xpcs_create_fwnode() method. It needs to be called with the device DW XPCS fwnode instance passed. That node will be then used to find the MDIO-device instance in order to create the DW XPCS descriptor. Note the method semantics and name is similar to what has been recently introduced in the Lynx PCS driver. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pcs')
-rw-r--r--include/linux/pcs/pcs-xpcs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pcs/pcs-xpcs.h b/include/linux/pcs/pcs-xpcs.h
index 813be644647f..b4a4eb6c8866 100644
--- a/include/linux/pcs/pcs-xpcs.h
+++ b/include/linux/pcs/pcs-xpcs.h
@@ -8,6 +8,7 @@
#define __LINUX_PCS_XPCS_H
#include <linux/clk.h>
+#include <linux/fwnode.h>
#include <linux/mdio.h>
#include <linux/phy.h>
#include <linux/phylink.h>
@@ -72,6 +73,8 @@ int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns,
int enable);
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr,
phy_interface_t interface);
+struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode,
+ phy_interface_t interface);
void xpcs_destroy(struct dw_xpcs *xpcs);
#endif /* __LINUX_PCS_XPCS_H */