xref: /linux/drivers/net/phy/phylib-internal.h (revision 6a33a706265daa3a0d92fece0baf6f2c3915f1cd)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * phylib-internal header
4  */
5 
6 #ifndef __PHYLIB_INTERNAL_H
7 #define __PHYLIB_INTERNAL_H
8 
9 struct mdio_device;
10 struct phy_device;
11 
12 extern const struct bus_type mdio_bus_type;
13 extern const struct class mdio_bus_class;
14 
15 /*
16  * phy_supported_speeds - return all speeds currently supported by a PHY device
17  */
18 unsigned int phy_supported_speeds(struct phy_device *phy,
19 				  unsigned int *speeds,
20 				  unsigned int size);
21 void of_set_phy_supported(struct phy_device *phydev);
22 void of_set_phy_eee_broken(struct phy_device *phydev);
23 void of_set_phy_timing_role(struct phy_device *phydev);
24 int phy_speed_down_core(struct phy_device *phydev);
25 void phy_check_downshift(struct phy_device *phydev);
26 
27 int mdiobus_register_device(struct mdio_device *mdiodev);
28 int mdiobus_unregister_device(struct mdio_device *mdiodev);
29 
30 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
31 
32 #endif /* __PHYLIB_INTERNAL_H */
33