Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * FWNODE helper for the MDIO (Ethernet PHY) API
0004  */
0005 
0006 #ifndef __LINUX_FWNODE_MDIO_H
0007 #define __LINUX_FWNODE_MDIO_H
0008 
0009 #include <linux/phy.h>
0010 
0011 #if IS_ENABLED(CONFIG_FWNODE_MDIO)
0012 int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio,
0013                        struct phy_device *phy,
0014                        struct fwnode_handle *child, u32 addr);
0015 
0016 int fwnode_mdiobus_register_phy(struct mii_bus *bus,
0017                 struct fwnode_handle *child, u32 addr);
0018 
0019 #else /* CONFIG_FWNODE_MDIO */
0020 int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio,
0021                        struct phy_device *phy,
0022                        struct fwnode_handle *child, u32 addr)
0023 {
0024     return -EINVAL;
0025 }
0026 
0027 static inline int fwnode_mdiobus_register_phy(struct mii_bus *bus,
0028                           struct fwnode_handle *child,
0029                           u32 addr)
0030 {
0031     return -EINVAL;
0032 }
0033 #endif
0034 
0035 #endif /* __LINUX_FWNODE_MDIO_H */