drivers/ptp/ptp_pch.c
Source file repositories/reference/linux-study-clean/drivers/ptp/ptp_pch.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ptp/ptp_pch.c- Extension
.c- Size
- 12458 bytes
- Lines
- 546
- Domain
- Driver Families
- Bucket
- drivers/ptp
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/err.hlinux/hex.hlinux/interrupt.hlinux/io.hlinux/io-64-nonatomic-lo-hi.hlinux/io-64-nonatomic-hi-lo.hlinux/irq.hlinux/kernel.hlinux/module.hlinux/pci.hlinux/ptp_clock_kernel.hlinux/ptp_pch.hlinux/slab.h
Detected Declarations
struct pch_ts_regsstruct pch_devstruct pch_paramsenum pch_statusfunction pch_eth_enable_setfunction pch_systime_readfunction pch_systime_writefunction pch_block_resetfunction pch_ch_control_writefunction pch_ch_event_readfunction pch_ch_event_writefunction pch_src_uuid_lo_readfunction pch_src_uuid_hi_readfunction pch_rx_snap_readfunction pch_tx_snap_readfunction pch_set_system_time_countfunction pch_resetfunction pch_set_station_addressfunction isrfunction ptp_pch_adjfinefunction ptp_pch_adjtimefunction ptp_pch_gettimefunction ptp_pch_settimefunction ptp_pch_enablefunction pch_removefunction pch_probeexport pch_ch_control_writeexport pch_ch_event_readexport pch_ch_event_writeexport pch_src_uuid_lo_readexport pch_src_uuid_hi_readexport pch_rx_snap_readexport pch_tx_snap_readexport pch_set_station_address
Annotated Snippet
static struct pci_driver pch_driver = {
.name = KBUILD_MODNAME,
.id_table = pch_ieee1588_pcidev_id,
.probe = pch_probe,
.remove = pch_remove,
};
module_pci_driver(pch_driver);
module_param_string(station,
pch_param.station, sizeof(pch_param.station), 0444);
MODULE_PARM_DESC(station,
"IEEE 1588 station address to use - colon separated hex values");
MODULE_AUTHOR("LAPIS SEMICONDUCTOR, <tshimizu818@gmail.com>");
MODULE_DESCRIPTION("PTP clock using the EG20T timer");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/hex.h`, `linux/interrupt.h`, `linux/io.h`, `linux/io-64-nonatomic-lo-hi.h`, `linux/io-64-nonatomic-hi-lo.h`, `linux/irq.h`.
- Detected declarations: `struct pch_ts_regs`, `struct pch_dev`, `struct pch_params`, `enum pch_status`, `function pch_eth_enable_set`, `function pch_systime_read`, `function pch_systime_write`, `function pch_block_reset`, `function pch_ch_control_write`, `function pch_ch_event_read`.
- Atlas domain: Driver Families / drivers/ptp.
- Implementation status: pattern 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.