drivers/net/phy/microchip_rds_ptp.h
Source file repositories/reference/linux-study-clean/drivers/net/phy/microchip_rds_ptp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/phy/microchip_rds_ptp.h- Extension
.h- Size
- 7565 bytes
- Lines
- 248
- 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.
- 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/ptp_clock_kernel.hlinux/ptp_clock.hlinux/ptp_classify.hlinux/net_tstamp.hlinux/mii.hlinux/phy.h
Detected Declarations
struct mchp_rds_ptp_clockstruct mchp_rds_ptp_rx_tsenum mchp_rds_ptp_baseenum mchp_rds_ptp_fifo_dirfunction mchp_rds_ptp_top_config_intrfunction mchp_rds_ptp_handle_interrupt
Annotated Snippet
struct mchp_rds_ptp_clock {
struct mii_timestamper mii_ts;
struct phy_device *phydev;
struct ptp_clock *ptp_clock;
struct sk_buff_head tx_queue;
struct sk_buff_head rx_queue;
struct list_head rx_ts_list;
struct ptp_clock_info caps;
/* Lock for Rx ts fifo */
spinlock_t rx_ts_lock;
int hwts_tx_type;
enum hwtstamp_rx_filters rx_filter;
int layer;
int version;
u16 port_base_addr;
u16 clk_base_addr;
/* Lock for phc */
struct mutex ptp_lock;
u8 mmd;
int mchp_rds_ptp_event;
int event_pin;
struct ptp_pin_desc *pin_config;
};
struct mchp_rds_ptp_rx_ts {
struct list_head list;
u32 seconds;
u32 nsec;
u16 seq_id;
};
#if IS_ENABLED(CONFIG_MICROCHIP_PHY_RDS_PTP)
struct mchp_rds_ptp_clock *mchp_rds_ptp_probe(struct phy_device *phydev, u8 mmd,
u16 clk_base, u16 port_base);
int mchp_rds_ptp_top_config_intr(struct mchp_rds_ptp_clock *clock,
u16 reg, u16 val, bool enable);
irqreturn_t mchp_rds_ptp_handle_interrupt(struct mchp_rds_ptp_clock *clock);
#else
static inline struct mchp_rds_ptp_clock *mchp_rds_ptp_probe(struct phy_device
*phydev, u8 mmd,
u16 clk_base,
u16 port_base)
{
return NULL;
}
static inline int mchp_rds_ptp_top_config_intr(struct mchp_rds_ptp_clock *clock,
u16 reg, u16 val, bool enable)
{
return 0;
}
static inline irqreturn_t mchp_rds_ptp_handle_interrupt(struct
mchp_rds_ptp_clock
* clock)
{
return IRQ_NONE;
}
#endif //CONFIG_MICROCHIP_PHY_RDS_PTP
#endif //_MICROCHIP_RDS_PTP_H
Annotation
- Immediate include surface: `linux/ptp_clock_kernel.h`, `linux/ptp_clock.h`, `linux/ptp_classify.h`, `linux/net_tstamp.h`, `linux/mii.h`, `linux/phy.h`.
- Detected declarations: `struct mchp_rds_ptp_clock`, `struct mchp_rds_ptp_rx_ts`, `enum mchp_rds_ptp_base`, `enum mchp_rds_ptp_fifo_dir`, `function mchp_rds_ptp_top_config_intr`, `function mchp_rds_ptp_handle_interrupt`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- 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.