Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszer...
[linux-2.6-block.git] / include / linux / phy_fixed.h
CommitLineData
7c32f470
VB
1#ifndef __PHY_FIXED_H
2#define __PHY_FIXED_H
3
7c32f470 4struct fixed_phy_status {
a79d8e93
VB
5 int link;
6 int speed;
7 int duplex;
8 int pause;
9 int asym_pause;
7c32f470
VB
10};
11
a7595121
TP
12struct device_node;
13
6539c44d 14#if IS_ENABLED(CONFIG_FIXED_PHY)
a79d8e93 15extern int fixed_phy_add(unsigned int irq, int phy_id,
a5597008
AL
16 struct fixed_phy_status *status,
17 int link_gpio);
fd2ef0ba
PG
18extern struct phy_device *fixed_phy_register(unsigned int irq,
19 struct fixed_phy_status *status,
a5597008 20 int link_gpio,
fd2ef0ba 21 struct device_node *np);
5bcbe0f3 22extern void fixed_phy_unregister(struct phy_device *phydev);
464c3668
FF
23extern int fixed_phy_set_link_update(struct phy_device *phydev,
24 int (*link_update)(struct net_device *,
25 struct fixed_phy_status *));
a3bebdce
SS
26extern int fixed_phy_update_state(struct phy_device *phydev,
27 const struct fixed_phy_status *status,
28 const struct fixed_phy_status *changed);
a79d8e93
VB
29#else
30static inline int fixed_phy_add(unsigned int irq, int phy_id,
a5597008
AL
31 struct fixed_phy_status *status,
32 int link_gpio)
a79d8e93
VB
33{
34 return -ENODEV;
35}
fd2ef0ba
PG
36static inline struct phy_device *fixed_phy_register(unsigned int irq,
37 struct fixed_phy_status *status,
a5597008 38 int gpio_link,
fd2ef0ba 39 struct device_node *np)
a7595121 40{
fd2ef0ba 41 return ERR_PTR(-ENODEV);
a7595121 42}
5bcbe0f3 43static inline void fixed_phy_unregister(struct phy_device *phydev)
46cfd6ea 44{
46cfd6ea 45}
464c3668 46static inline int fixed_phy_set_link_update(struct phy_device *phydev,
a79d8e93 47 int (*link_update)(struct net_device *,
464c3668
FF
48 struct fixed_phy_status *))
49{
50 return -ENODEV;
51}
a3bebdce
SS
52static inline int fixed_phy_update_state(struct phy_device *phydev,
53 const struct fixed_phy_status *status,
54 const struct fixed_phy_status *changed)
55{
56 return -ENODEV;
57}
464c3668 58#endif /* CONFIG_FIXED_PHY */
7c32f470
VB
59
60#endif /* __PHY_FIXED_H */