drivers/ptp/ptp_clockmatrix.h
Source file repositories/reference/linux-study-clean/drivers/ptp/ptp_clockmatrix.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/ptp/ptp_clockmatrix.h- Extension
.h- Size
- 3657 bytes
- Lines
- 143
- Domain
- Driver Families
- Bucket
- drivers/ptp
- 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/ktime.hlinux/mfd/idt8a340_reg.hlinux/ptp_clock.hlinux/regmap.h
Detected Declarations
struct idtcmstruct idtcm_channelstruct idtcmstruct idtcm_fwrcenum fw_versionenum ptp_pll_mode
Annotated Snippet
struct idtcm_channel {
struct ptp_clock_info caps;
struct ptp_clock *ptp_clock;
struct idtcm *idtcm;
u16 dpll_phase;
u16 dpll_freq;
u16 dpll_n;
u16 dpll_ctrl_n;
u16 dpll_phase_pull_in;
u16 tod_read_primary;
u16 tod_read_secondary;
u16 tod_write;
u16 tod_n;
u16 hw_dpll_n;
u8 sync_src;
enum ptp_pll_mode mode;
int (*configure_write_frequency)(struct idtcm_channel *channel);
int (*configure_write_phase)(struct idtcm_channel *channel);
int (*do_phase_pull_in)(struct idtcm_channel *channel,
s32 offset_ns, u32 max_ffo_ppb);
s32 current_freq_scaled_ppm;
bool phase_pull_in;
u32 dco_delay;
/* last input trigger for extts */
u8 refn;
u8 pll;
u8 tod;
u16 output_mask;
};
struct idtcm {
struct idtcm_channel channel[MAX_TOD];
struct device *dev;
u8 tod_mask;
char version[16];
enum fw_version fw_ver;
/* Polls for external time stamps */
u8 extts_mask;
bool extts_single_shot;
struct delayed_work extts_work;
/* Remember the ptp channel to report extts */
struct idtcm_channel *event_channel[MAX_TOD];
/* Mutex to protect operations from being interrupted */
struct mutex *lock;
struct device *mfd;
struct regmap *regmap;
/* Overhead calculation for adjtime */
u8 calculate_overhead_flag;
s64 tod_write_overhead_ns;
ktime_t start_time;
};
struct idtcm_fwrc {
u8 hiaddr;
u8 loaddr;
u8 value;
u8 reserved;
} __packed;
#endif /* PTP_IDTCLOCKMATRIX_H */
Annotation
- Immediate include surface: `linux/ktime.h`, `linux/mfd/idt8a340_reg.h`, `linux/ptp_clock.h`, `linux/regmap.h`.
- Detected declarations: `struct idtcm`, `struct idtcm_channel`, `struct idtcm`, `struct idtcm_fwrc`, `enum fw_version`, `enum ptp_pll_mode`.
- Atlas domain: Driver Families / drivers/ptp.
- 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.