Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / phy_fixed.h
blobee54453a40a0e3ba6590f8310bd3b817d632a5f5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PHY_FIXED_H
3 #define __PHY_FIXED_H
5 struct fixed_phy_status {
6 int link;
7 int speed;
8 int duplex;
9 int pause;
10 int asym_pause;
13 struct device_node;
15 #if IS_ENABLED(CONFIG_FIXED_PHY)
16 extern int fixed_phy_add(unsigned int irq, int phy_id,
17 struct fixed_phy_status *status,
18 int link_gpio);
19 extern struct phy_device *fixed_phy_register(unsigned int irq,
20 struct fixed_phy_status *status,
21 int link_gpio,
22 struct device_node *np);
23 extern void fixed_phy_unregister(struct phy_device *phydev);
24 extern int fixed_phy_set_link_update(struct phy_device *phydev,
25 int (*link_update)(struct net_device *,
26 struct fixed_phy_status *));
27 #else
28 static inline int fixed_phy_add(unsigned int irq, int phy_id,
29 struct fixed_phy_status *status,
30 int link_gpio)
32 return -ENODEV;
34 static inline struct phy_device *fixed_phy_register(unsigned int irq,
35 struct fixed_phy_status *status,
36 int gpio_link,
37 struct device_node *np)
39 return ERR_PTR(-ENODEV);
41 static inline void fixed_phy_unregister(struct phy_device *phydev)
44 static inline int fixed_phy_set_link_update(struct phy_device *phydev,
45 int (*link_update)(struct net_device *,
46 struct fixed_phy_status *))
48 return -ENODEV;
50 #endif /* CONFIG_FIXED_PHY */
52 #endif /* __PHY_FIXED_H */