drivers/hwtracing/coresight/coresight-tpda.h

Source file repositories/reference/linux-study-clean/drivers/hwtracing/coresight/coresight-tpda.h

File Facts

System
Linux kernel
Corpus path
drivers/hwtracing/coresight/coresight-tpda.h
Extension
.h
Size
3356 bytes
Lines
112
Domain
Driver Families
Bucket
drivers/hwtracing
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 tpda_drvdata {
	void __iomem		*base;
	struct device		*dev;
	struct coresight_device	*csdev;
	spinlock_t		spinlock;
	u8			atid;
	u32			dsb_esize;
	u32			cmb_esize;
	bool			trig_async;
	bool			trig_flag_ts;
	bool			trig_freq;
	bool			freq_ts;
	bool			cmbchan_mode;
	bool			syncr_mode;
	u32			syncr_count;
};

/* Enumerate members of global control register(cr) */
enum tpda_cr_mem {
	FREQTS,
	FRIE,
	FLRIE,
	SRIE,
	CMBCHANMODE
};

/**
 * struct tpda_trig_sysfs_attribute - Record the member variables of cross
 * trigger register that need to be operated by sysfs file
 * @attr:	The device attribute
 * @mem:	The member in the control register data structure
 */
struct tpda_trig_sysfs_attribute {
	struct device_attribute attr;
	enum tpda_cr_mem mem;
};

#define tpda_trig_sysfs_rw(name, mem)				\
	(&((struct tpda_trig_sysfs_attribute[]) {		\
	   {							\
		__ATTR(name, 0644, tpda_trig_sysfs_show,	\
		tpda_trig_sysfs_store),				\
		mem,						\
	   }							\
	   })[0].attr.attr)

#endif  /* _CORESIGHT_CORESIGHT_TPDA_H */

Annotation

Implementation Notes