]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - include/linux/phy_fixed.h
1 /* SPDX-License-Identifier: GPL-2.0 */
5 struct fixed_phy_status
{
15 #if IS_ENABLED(CONFIG_FIXED_PHY)
16 extern int fixed_phy_change_carrier(struct net_device
*dev
, bool new_carrier
);
17 extern int fixed_phy_add(unsigned int irq
, int phy_id
,
18 struct fixed_phy_status
*status
);
19 extern struct phy_device
*fixed_phy_register(unsigned int irq
,
20 struct fixed_phy_status
*status
,
21 struct device_node
*np
);
23 extern struct phy_device
*
24 fixed_phy_register_with_gpiod(unsigned int irq
,
25 struct fixed_phy_status
*status
,
26 struct gpio_desc
*gpiod
);
28 extern void fixed_phy_unregister(struct phy_device
*phydev
);
29 extern int fixed_phy_set_link_update(struct phy_device
*phydev
,
30 int (*link_update
)(struct net_device
*,
31 struct fixed_phy_status
*));
33 static inline int fixed_phy_add(unsigned int irq
, int phy_id
,
34 struct fixed_phy_status
*status
)
38 static inline struct phy_device
*fixed_phy_register(unsigned int irq
,
39 struct fixed_phy_status
*status
,
40 struct device_node
*np
)
42 return ERR_PTR(-ENODEV
);
45 static inline struct phy_device
*
46 fixed_phy_register_with_gpiod(unsigned int irq
,
47 struct fixed_phy_status
*status
,
48 struct gpio_desc
*gpiod
)
50 return ERR_PTR(-ENODEV
);
53 static inline void fixed_phy_unregister(struct phy_device
*phydev
)
56 static inline int fixed_phy_set_link_update(struct phy_device
*phydev
,
57 int (*link_update
)(struct net_device
*,
58 struct fixed_phy_status
*))
62 static inline int fixed_phy_change_carrier(struct net_device
*dev
, bool new_carrier
)
66 #endif /* CONFIG_FIXED_PHY */
68 #endif /* __PHY_FIXED_H */