drivers/net/phy/phylib.h

Source file repositories/reference/linux-study-clean/drivers/net/phy/phylib.h

File Facts

System
Linux kernel
Corpus path
drivers/net/phy/phylib.h
Extension
.h
Size
1485 bytes
Lines
40
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __PHYLIB_H
#define __PHYLIB_H

struct device_node;
struct phy_device;
struct mii_bus;

struct device_node *phy_package_get_node(struct phy_device *phydev);
void *phy_package_get_priv(struct phy_device *phydev);
int __phy_package_read(struct phy_device *phydev, unsigned int addr_offset,
		       u32 regnum);
int __phy_package_write(struct phy_device *phydev, unsigned int addr_offset,
			u32 regnum, u16 val);
int __phy_package_read_mmd(struct phy_device *phydev,
			   unsigned int addr_offset, int devad,
			   u32 regnum);
int __phy_package_write_mmd(struct phy_device *phydev,
			    unsigned int addr_offset, int devad,
			    u32 regnum, u16 val);
bool phy_package_init_once(struct phy_device *phydev);
bool phy_package_probe_once(struct phy_device *phydev);
int phy_package_join(struct phy_device *phydev, int base_addr, size_t priv_size);
int of_phy_package_join(struct phy_device *phydev, size_t priv_size);
void phy_package_leave(struct phy_device *phydev);
int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
			  int base_addr, size_t priv_size);
int devm_of_phy_package_join(struct device *dev, struct phy_device *phydev,
			     size_t priv_size);
int mmd_phy_read(struct mii_bus *bus, int phy_addr, bool is_c45,
		 int devad, u32 regnum);
int mmd_phy_write(struct mii_bus *bus, int phy_addr, bool is_c45,
		  int devad, u32 regnum, u16 val);

#endif /* __PHYLIB_H */

Annotation

Implementation Notes