17c32f470SVitaly Bordug #ifndef __PHY_FIXED_H 27c32f470SVitaly Bordug #define __PHY_FIXED_H 37c32f470SVitaly Bordug 47c32f470SVitaly Bordug struct fixed_phy_status { 5a79d8e93SVitaly Bordug int link; 6a79d8e93SVitaly Bordug int speed; 7a79d8e93SVitaly Bordug int duplex; 8a79d8e93SVitaly Bordug int pause; 9a79d8e93SVitaly Bordug int asym_pause; 107c32f470SVitaly Bordug }; 117c32f470SVitaly Bordug 12a7595121SThomas Petazzoni struct device_node; 13a7595121SThomas Petazzoni 14a79d8e93SVitaly Bordug #ifdef CONFIG_FIXED_PHY 15a79d8e93SVitaly Bordug extern int fixed_phy_add(unsigned int irq, int phy_id, 16a79d8e93SVitaly Bordug struct fixed_phy_status *status); 17a7595121SThomas Petazzoni extern int fixed_phy_register(unsigned int irq, 18a7595121SThomas Petazzoni struct fixed_phy_status *status, 19a7595121SThomas Petazzoni struct device_node *np); 20*46cfd6eaSKonrad Zapalowicz extern void fixed_phy_del(int phy_addr); 21a79d8e93SVitaly Bordug #else 22a79d8e93SVitaly Bordug static inline int fixed_phy_add(unsigned int irq, int phy_id, 23a79d8e93SVitaly Bordug struct fixed_phy_status *status) 24a79d8e93SVitaly Bordug { 25a79d8e93SVitaly Bordug return -ENODEV; 26a79d8e93SVitaly Bordug } 27a7595121SThomas Petazzoni static inline int fixed_phy_register(unsigned int irq, 28a7595121SThomas Petazzoni struct fixed_phy_status *status, 29a7595121SThomas Petazzoni struct device_node *np) 30a7595121SThomas Petazzoni { 31a7595121SThomas Petazzoni return -ENODEV; 32a7595121SThomas Petazzoni } 33*46cfd6eaSKonrad Zapalowicz static inline int fixed_phy_del(int phy_addr) 34*46cfd6eaSKonrad Zapalowicz { 35*46cfd6eaSKonrad Zapalowicz return -ENODEV; 36*46cfd6eaSKonrad Zapalowicz } 37a79d8e93SVitaly Bordug #endif /* CONFIG_FIXED_PHY */ 387c32f470SVitaly Bordug 39a79d8e93SVitaly Bordug /* 40a79d8e93SVitaly Bordug * This function issued only by fixed_phy-aware drivers, no need 41a79d8e93SVitaly Bordug * protect it with #ifdef 42a79d8e93SVitaly Bordug */ 43a79d8e93SVitaly Bordug extern int fixed_phy_set_link_update(struct phy_device *phydev, 44a79d8e93SVitaly Bordug int (*link_update)(struct net_device *, 45a79d8e93SVitaly Bordug struct fixed_phy_status *)); 467c32f470SVitaly Bordug 477c32f470SVitaly Bordug #endif /* __PHY_FIXED_H */ 48