drivers/net/phy/uPD60620.c
Source file repositories/reference/linux-study-clean/drivers/net/phy/uPD60620.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/phy/uPD60620.c- Extension
.c- Size
- 2490 bytes
- Lines
- 99
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/phy.h
Detected Declarations
function Copyrightfunction upd60620_read_status
Annotated Snippet
if (phy_state & (PHY_PHYSCR_10MB | PHY_PHYSCR_100MB)) {
phydev->link = 1;
phydev->speed = SPEED_10;
phydev->duplex = DUPLEX_HALF;
if (phy_state & PHY_PHYSCR_100MB)
phydev->speed = SPEED_100;
if (phy_state & PHY_PHYSCR_DUPLEX)
phydev->duplex = DUPLEX_FULL;
phy_state = phy_read(phydev, MII_LPA);
if (phy_state < 0)
return phy_state;
mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising,
phy_state);
phy_resolve_aneg_pause(phydev);
}
}
return 0;
}
MODULE_DESCRIPTION("Renesas uPD60620 PHY driver");
MODULE_AUTHOR("Bernd Edlinger <bernd.edlinger@hotmail.de>");
MODULE_LICENSE("GPL");
static struct phy_driver upd60620_driver[1] = { {
.phy_id = UPD60620_PHY_ID,
.phy_id_mask = 0xfffffffe,
.name = "Renesas uPD60620",
/* PHY_BASIC_FEATURES */
.flags = 0,
.config_init = upd60620_config_init,
.read_status = upd60620_read_status,
} };
module_phy_driver(upd60620_driver);
static const struct mdio_device_id __maybe_unused upd60620_tbl[] = {
{ UPD60620_PHY_ID, 0xfffffffe },
{ }
};
MODULE_DEVICE_TABLE(mdio, upd60620_tbl);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/phy.h`.
- Detected declarations: `function Copyright`, `function upd60620_read_status`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.