xref: /linux/drivers/net/phy/phylib-internal.h (revision 0ce92d548b44649a8de706f9bb9e74a4ed2f18a7)
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 phy_device;
10 struct mii_bus;
11 
12 /*
13  * phy_supported_speeds - return all speeds currently supported by a PHY device
14  */
15 unsigned int phy_supported_speeds(struct phy_device *phy,
16 				  unsigned int *speeds,
17 				  unsigned int size);
18 void of_set_phy_supported(struct phy_device *phydev);
19 void of_set_phy_eee_broken(struct phy_device *phydev);
20 void of_set_phy_timing_role(struct phy_device *phydev);
21 int phy_speed_down_core(struct phy_device *phydev);
22 void phy_check_downshift(struct phy_device *phydev);
23 
24 int mmd_phy_read(struct mii_bus *bus, int phy_addr, bool is_c45,
25 		 int devad, u32 regnum);
26 int mmd_phy_write(struct mii_bus *bus, int phy_addr, bool is_c45,
27 		  int devad, u32 regnum, u16 val);
28 
29 int genphy_c45_read_eee_adv(struct phy_device *phydev, unsigned long *adv);
30 
31 #endif /* __PHYLIB_INTERNAL_H */
32