Debian Codegraph @

drivers/net/phy/phylib.h

raw
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * phylib header
4 */
5
6 #ifndef __PHYLIB_H
7 #define __PHYLIB_H
8
9 struct device_node;
10 struct phy_device;
11 struct mii_bus;
12
13 struct device_node *phy_package_get_node(struct phy_device *phydev);
14 void *phy_package_get_priv(struct phy_device *phydev);
15 int __phy_package_read(struct phy_device *phydev, unsigned int addr_offset,
16 u32 regnum);
17 int __phy_package_write(struct phy_device *phydev, unsigned int addr_offset,
18 u32 regnum, u16 val);
19 int __phy_package_read_mmd(struct phy_device *phydev,
20 unsigned int addr_offset, int devad,
21 u32 regnum);
22 int __phy_package_write_mmd(struct phy_device *phydev,
23 unsigned int addr_offset, int devad,
24 u32 regnum, u16 val);
25 bool phy_package_init_once(struct phy_device *phydev);
26 bool phy_package_probe_once(struct phy_device *phydev);
27 int phy_package_join(struct phy_device *phydev, int base_addr, size_t priv_size);
28 int of_phy_package_join(struct phy_device *phydev, size_t priv_size);
29 void phy_package_leave(struct phy_device *phydev);
30 int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
31 int base_addr, size_t priv_size);
32 int devm_of_phy_package_join(struct device *dev, struct phy_device *phydev,
33 size_t priv_size);
34 int mmd_phy_read(struct mii_bus *bus, int phy_addr, bool is_c45,
35 int devad, u32 regnum);
36 int mmd_phy_write(struct mii_bus *bus, int phy_addr, bool is_c45,
37 int devad, u32 regnum, u16 val);
38
39 #endif /* __PHYLIB_H */