ARM: sun7i: i12 tvbox: Convert to DT label based syntax
[linux-2.6/btrfs-unstable.git] / include / linux / phy_fixed.h
blobfe5732d53edacd17af2e259e191f60e595721345
1 #ifndef __PHY_FIXED_H
2 #define __PHY_FIXED_H
4 struct fixed_phy_status {
5 int link;
6 int speed;
7 int duplex;
8 int pause;
9 int asym_pause;
12 struct device_node;
14 #if IS_ENABLED(CONFIG_FIXED_PHY)
15 extern int fixed_phy_add(unsigned int irq, int phy_id,
16 struct fixed_phy_status *status);
17 extern struct phy_device *fixed_phy_register(unsigned int irq,
18 struct fixed_phy_status *status,
19 struct device_node *np);
20 extern void fixed_phy_del(int phy_addr);
21 extern int fixed_phy_set_link_update(struct phy_device *phydev,
22 int (*link_update)(struct net_device *,
23 struct fixed_phy_status *));
24 extern int fixed_phy_update_state(struct phy_device *phydev,
25 const struct fixed_phy_status *status,
26 const struct fixed_phy_status *changed);
27 #else
28 static inline int fixed_phy_add(unsigned int irq, int phy_id,
29 struct fixed_phy_status *status)
31 return -ENODEV;
33 static inline struct phy_device *fixed_phy_register(unsigned int irq,
34 struct fixed_phy_status *status,
35 struct device_node *np)
37 return ERR_PTR(-ENODEV);
39 static inline int fixed_phy_del(int phy_addr)
41 return -ENODEV;
43 static inline int fixed_phy_set_link_update(struct phy_device *phydev,
44 int (*link_update)(struct net_device *,
45 struct fixed_phy_status *))
47 return -ENODEV;
49 static inline int fixed_phy_update_state(struct phy_device *phydev,
50 const struct fixed_phy_status *status,
51 const struct fixed_phy_status *changed)
53 return -ENODEV;
55 #endif /* CONFIG_FIXED_PHY */
57 #endif /* __PHY_FIXED_H */