phy_fixed.h 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __PHY_FIXED_H
  2. #define __PHY_FIXED_H
  3. struct fixed_phy_status {
  4. int link;
  5. int speed;
  6. int duplex;
  7. int pause;
  8. int asym_pause;
  9. };
  10. struct device_node;
  11. #ifdef CONFIG_FIXED_PHY
  12. extern int fixed_phy_add(unsigned int irq, int phy_id,
  13. struct fixed_phy_status *status);
  14. extern int fixed_phy_register(unsigned int irq,
  15. struct fixed_phy_status *status,
  16. struct device_node *np);
  17. #else
  18. static inline int fixed_phy_add(unsigned int irq, int phy_id,
  19. struct fixed_phy_status *status)
  20. {
  21. return -ENODEV;
  22. }
  23. static inline int fixed_phy_register(unsigned int irq,
  24. struct fixed_phy_status *status,
  25. struct device_node *np)
  26. {
  27. return -ENODEV;
  28. }
  29. #endif /* CONFIG_FIXED_PHY */
  30. /*
  31. * This function issued only by fixed_phy-aware drivers, no need
  32. * protect it with #ifdef
  33. */
  34. extern int fixed_phy_set_link_update(struct phy_device *phydev,
  35. int (*link_update)(struct net_device *,
  36. struct fixed_phy_status *));
  37. #endif /* __PHY_FIXED_H */