xref: /openbmc/linux/include/linux/phy_fixed.h (revision a79d8e93d300adb84cccc38ac396cfb118c238ad)
17c32f470SVitaly Bordug #ifndef __PHY_FIXED_H
27c32f470SVitaly Bordug #define __PHY_FIXED_H
37c32f470SVitaly Bordug 
47c32f470SVitaly Bordug struct fixed_phy_status {
5*a79d8e93SVitaly Bordug 	int link;
6*a79d8e93SVitaly Bordug 	int speed;
7*a79d8e93SVitaly Bordug 	int duplex;
8*a79d8e93SVitaly Bordug 	int pause;
9*a79d8e93SVitaly Bordug 	int asym_pause;
107c32f470SVitaly Bordug };
117c32f470SVitaly Bordug 
12*a79d8e93SVitaly Bordug #ifdef CONFIG_FIXED_PHY
13*a79d8e93SVitaly Bordug extern int fixed_phy_add(unsigned int irq, int phy_id,
14*a79d8e93SVitaly Bordug 			 struct fixed_phy_status *status);
15*a79d8e93SVitaly Bordug #else
16*a79d8e93SVitaly Bordug static inline int fixed_phy_add(unsigned int irq, int phy_id,
17*a79d8e93SVitaly Bordug 				struct fixed_phy_status *status)
18*a79d8e93SVitaly Bordug {
19*a79d8e93SVitaly Bordug 	return -ENODEV;
20*a79d8e93SVitaly Bordug }
21*a79d8e93SVitaly Bordug #endif /* CONFIG_FIXED_PHY */
227c32f470SVitaly Bordug 
23*a79d8e93SVitaly Bordug /*
24*a79d8e93SVitaly Bordug  * This function issued only by fixed_phy-aware drivers, no need
25*a79d8e93SVitaly Bordug  * protect it with #ifdef
26*a79d8e93SVitaly Bordug  */
27*a79d8e93SVitaly Bordug extern int fixed_phy_set_link_update(struct phy_device *phydev,
28*a79d8e93SVitaly Bordug 			int (*link_update)(struct net_device *,
29*a79d8e93SVitaly Bordug 					   struct fixed_phy_status *));
307c32f470SVitaly Bordug 
317c32f470SVitaly Bordug #endif /* __PHY_FIXED_H */
32