drivers/net/ethernet/ti/am65-cpts.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/am65-cpts.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/ti/am65-cpts.h
Extension
.h
Size
2291 bytes
Lines
95
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct am65_cpts_estf_cfg {
	u64 ns_period;
	u64 ns_start;
};

#if IS_ENABLED(CONFIG_TI_K3_AM65_CPTS)
void am65_cpts_release(struct am65_cpts *cpts);
struct am65_cpts *am65_cpts_create(struct device *dev, void __iomem *regs,
				   struct device_node *node);
int am65_cpts_phc_index(struct am65_cpts *cpts);
void am65_cpts_rx_timestamp(struct am65_cpts *cpts, unsigned int port_id,
			    struct sk_buff *skb);
void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, unsigned int port_id,
				 struct sk_buff *skb);
u64 am65_cpts_ns_gettime(struct am65_cpts *cpts);
int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx,
			  struct am65_cpts_estf_cfg *cfg);
void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx);
void am65_cpts_suspend(struct am65_cpts *cpts);
void am65_cpts_resume(struct am65_cpts *cpts);
#else
static inline void am65_cpts_release(struct am65_cpts *cpts)
{
}

static inline struct am65_cpts *am65_cpts_create(struct device *dev,
						 void __iomem *regs,
						 struct device_node *node)
{
	return ERR_PTR(-EOPNOTSUPP);
}

static inline int am65_cpts_phc_index(struct am65_cpts *cpts)
{
	return -1;
}

static inline void am65_cpts_rx_timestamp(struct am65_cpts *cpts,
					  unsigned int port_id,
					  struct sk_buff *skb)
{
}

static inline void am65_cpts_tx_timestamp(struct am65_cpts *cpts,
					  struct sk_buff *skb)
{
}

static inline void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts,
					       unsigned int port_id,
					       struct sk_buff *skb)
{
}

static inline s64 am65_cpts_ns_gettime(struct am65_cpts *cpts)
{
	return 0;
}

static inline int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx,
					struct am65_cpts_estf_cfg *cfg)
{
	return 0;
}

static inline void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx)
{
}

static inline void am65_cpts_suspend(struct am65_cpts *cpts)
{
}

static inline void am65_cpts_resume(struct am65_cpts *cpts)
{
}
#endif

#endif /* K3_CPTS_H_ */

Annotation

Implementation Notes