include/linux/phy.h
Source file repositories/reference/linux-study-clean/include/linux/phy.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/phy.h- Extension
.h- Size
- 87931 bytes
- Lines
- 2488
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler.hlinux/spinlock.hlinux/ethtool.hlinux/leds.hlinux/linkmode.hlinux/netlink.hlinux/mdio.hlinux/mii.hlinux/mii_timestamper.hlinux/module.hlinux/timer.hlinux/workqueue.hlinux/mod_devicetable.hlinux/u64_stats_sync.hlinux/irqreturn.hlinux/iopoll.hlinux/refcount.hlinux/atomic.hnet/eee.h
Detected Declarations
struct devicestruct kernel_hwtstamp_configstruct phylinkstruct phy_portstruct sfp_busstruct sfp_upstream_opsstruct sk_buffstruct mdio_bus_statsstruct mii_busstruct phy_c45_device_idsstruct macsec_contextstruct macsec_opsstruct phy_oatc14_sqi_capabilitystruct phy_devicestruct phy_tdr_configstruct phy_plca_cfgstruct phy_plca_statusstruct phy_ledstruct phy_mse_capabilitystruct phy_mse_snapshotstruct phy_driverenum phy_stateenum link_inband_signallingenum phy_led_modesenum phy_mse_channelfunction phy_interface_zerofunction phy_interface_emptyfunction phy_interface_copyfunction phy_interface_weightfunction phy_interface_andfunction phy_interface_orfunction phy_interface_set_rgmiifunction rgmii_clockfunction tofunction phy_id_compare_vendorfunction phy_id_compare_modelfunction phydev_id_comparefunction phy_is_startedfunction phy_driver_is_genphyfunction phy_disable_eee_modefunction phy_can_wakeupfunction phy_readfunction __phy_readfunction phy_writefunction __phy_writefunction __phy_modify_changedfunction __phy_set_bitsfunction __phy_clear_bits
Annotated Snippet
* replaces module_init() and module_exit().
*/
#define phy_module_driver(__phy_drivers, __count) \
static int __init phy_module_init(void) \
{ \
return phy_drivers_register(__phy_drivers, __count, THIS_MODULE); \
} \
module_init(phy_module_init); \
static void __exit phy_module_exit(void) \
{ \
phy_drivers_unregister(__phy_drivers, __count); \
} \
module_exit(phy_module_exit)
#define module_phy_driver(__phy_drivers) \
phy_module_driver(__phy_drivers, ARRAY_SIZE(__phy_drivers))
#endif /* __PHY_H */
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/spinlock.h`, `linux/ethtool.h`, `linux/leds.h`, `linux/linkmode.h`, `linux/netlink.h`, `linux/mdio.h`, `linux/mii.h`.
- Detected declarations: `struct device`, `struct kernel_hwtstamp_config`, `struct phylink`, `struct phy_port`, `struct sfp_bus`, `struct sfp_upstream_ops`, `struct sk_buff`, `struct mdio_bus_stats`, `struct mii_bus`, `struct phy_c45_device_ids`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.