hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/phy_fixed.h
....@@ -11,33 +11,46 @@
1111 };
1212
1313 struct device_node;
14
+struct gpio_desc;
1415
1516 #if IS_ENABLED(CONFIG_FIXED_PHY)
17
+extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);
1618 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);
1920 extern struct phy_device *fixed_phy_register(unsigned int irq,
2021 struct fixed_phy_status *status,
21
- int link_gpio,
2222 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
+
2329 extern void fixed_phy_unregister(struct phy_device *phydev);
2430 extern int fixed_phy_set_link_update(struct phy_device *phydev,
2531 int (*link_update)(struct net_device *,
2632 struct fixed_phy_status *));
2733 #else
2834 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)
3136 {
3237 return -ENODEV;
3338 }
3439 static inline struct phy_device *fixed_phy_register(unsigned int irq,
3540 struct fixed_phy_status *status,
36
- int gpio_link,
3741 struct device_node *np)
3842 {
3943 return ERR_PTR(-ENODEV);
4044 }
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
+
4154 static inline void fixed_phy_unregister(struct phy_device *phydev)
4255 {
4356 }
....@@ -47,6 +60,10 @@
4760 {
4861 return -ENODEV;
4962 }
63
+static inline int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier)
64
+{
65
+ return -EINVAL;
66
+}
5067 #endif /* CONFIG_FIXED_PHY */
5168
5269 #endif /* __PHY_FIXED_H */