.. | .. |
---|
11 | 11 | }; |
---|
12 | 12 | |
---|
13 | 13 | struct device_node; |
---|
| 14 | +struct gpio_desc; |
---|
14 | 15 | |
---|
15 | 16 | #if IS_ENABLED(CONFIG_FIXED_PHY) |
---|
| 17 | +extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier); |
---|
16 | 18 | extern int fixed_phy_add(unsigned int irq, int phy_id, |
---|
17 | | - struct fixed_phy_status *status, |
---|
18 | | - int link_gpio); |
---|
| 19 | + struct fixed_phy_status *status); |
---|
19 | 20 | extern struct phy_device *fixed_phy_register(unsigned int irq, |
---|
20 | 21 | struct fixed_phy_status *status, |
---|
21 | | - int link_gpio, |
---|
22 | 22 | struct device_node *np); |
---|
| 23 | + |
---|
| 24 | +extern struct phy_device * |
---|
| 25 | +fixed_phy_register_with_gpiod(unsigned int irq, |
---|
| 26 | + struct fixed_phy_status *status, |
---|
| 27 | + struct gpio_desc *gpiod); |
---|
| 28 | + |
---|
23 | 29 | extern void fixed_phy_unregister(struct phy_device *phydev); |
---|
24 | 30 | extern int fixed_phy_set_link_update(struct phy_device *phydev, |
---|
25 | 31 | int (*link_update)(struct net_device *, |
---|
26 | 32 | struct fixed_phy_status *)); |
---|
27 | 33 | #else |
---|
28 | 34 | static inline int fixed_phy_add(unsigned int irq, int phy_id, |
---|
29 | | - struct fixed_phy_status *status, |
---|
30 | | - int link_gpio) |
---|
| 35 | + struct fixed_phy_status *status) |
---|
31 | 36 | { |
---|
32 | 37 | return -ENODEV; |
---|
33 | 38 | } |
---|
34 | 39 | static inline struct phy_device *fixed_phy_register(unsigned int irq, |
---|
35 | 40 | struct fixed_phy_status *status, |
---|
36 | | - int gpio_link, |
---|
37 | 41 | struct device_node *np) |
---|
38 | 42 | { |
---|
39 | 43 | return ERR_PTR(-ENODEV); |
---|
40 | 44 | } |
---|
| 45 | + |
---|
| 46 | +static inline struct phy_device * |
---|
| 47 | +fixed_phy_register_with_gpiod(unsigned int irq, |
---|
| 48 | + struct fixed_phy_status *status, |
---|
| 49 | + struct gpio_desc *gpiod) |
---|
| 50 | +{ |
---|
| 51 | + return ERR_PTR(-ENODEV); |
---|
| 52 | +} |
---|
| 53 | + |
---|
41 | 54 | static inline void fixed_phy_unregister(struct phy_device *phydev) |
---|
42 | 55 | { |
---|
43 | 56 | } |
---|
.. | .. |
---|
47 | 60 | { |
---|
48 | 61 | return -ENODEV; |
---|
49 | 62 | } |
---|
| 63 | +static inline int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier) |
---|
| 64 | +{ |
---|
| 65 | + return -EINVAL; |
---|
| 66 | +} |
---|
50 | 67 | #endif /* CONFIG_FIXED_PHY */ |
---|
51 | 68 | |
---|
52 | 69 | #endif /* __PHY_FIXED_H */ |
---|