drivers/input/misc/iqs269a.c

Source file repositories/reference/linux-study-clean/drivers/input/misc/iqs269a.c

File Facts

System
Linux kernel
Corpus path
drivers/input/misc/iqs269a.c
Extension
.c
Size
50443 bytes
Lines
1977
Domain
Driver Families
Bucket
drivers/input
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 iqs269_switch_desc {
	unsigned int code;
	bool enabled;
};

struct iqs269_event_desc {
	const char *name;
	enum iqs269_st_offs st_offs;
	enum iqs269_th_offs th_offs;
	bool dir_up;
	u8 mask;
};

static const struct iqs269_event_desc iqs269_events[] = {
	[IQS269_EVENT_PROX_DN] = {
		.name = "event-prox",
		.st_offs = IQS269_ST_OFFS_PROX,
		.th_offs = IQS269_TH_OFFS_PROX,
		.mask = IQS269_EVENT_MASK_PROX,
	},
	[IQS269_EVENT_PROX_UP] = {
		.name = "event-prox-alt",
		.st_offs = IQS269_ST_OFFS_PROX,
		.th_offs = IQS269_TH_OFFS_PROX,
		.dir_up = true,
		.mask = IQS269_EVENT_MASK_PROX,
	},
	[IQS269_EVENT_TOUCH_DN] = {
		.name = "event-touch",
		.st_offs = IQS269_ST_OFFS_TOUCH,
		.th_offs = IQS269_TH_OFFS_TOUCH,
		.mask = IQS269_EVENT_MASK_TOUCH,
	},
	[IQS269_EVENT_TOUCH_UP] = {
		.name = "event-touch-alt",
		.st_offs = IQS269_ST_OFFS_TOUCH,
		.th_offs = IQS269_TH_OFFS_TOUCH,
		.dir_up = true,
		.mask = IQS269_EVENT_MASK_TOUCH,
	},
	[IQS269_EVENT_DEEP_DN] = {
		.name = "event-deep",
		.st_offs = IQS269_ST_OFFS_DEEP,
		.th_offs = IQS269_TH_OFFS_DEEP,
		.mask = IQS269_EVENT_MASK_DEEP,
	},
	[IQS269_EVENT_DEEP_UP] = {
		.name = "event-deep-alt",
		.st_offs = IQS269_ST_OFFS_DEEP,
		.th_offs = IQS269_TH_OFFS_DEEP,
		.dir_up = true,
		.mask = IQS269_EVENT_MASK_DEEP,
	},
};

struct iqs269_ver_info {
	u8 prod_num;
	u8 sw_num;
	u8 hw_num;
	u8 fw_num;
} __packed;

struct iqs269_ch_reg {
	u8 rx_enable;
	u8 tx_enable;
	__be16 engine_a;
	__be16 engine_b;
	__be16 ati_comp;
	u8 thresh[3];
	u8 hyst;
	u8 assoc_select;
	u8 assoc_weight;
} __packed;

struct iqs269_sys_reg {
	__be16 general;
	u8 active;
	u8 filter;
	u8 reseed;
	u8 event_mask;
	u8 rate_np;
	u8 rate_lp;
	u8 rate_ulp;
	u8 timeout_pwr;
	u8 timeout_rdy;
	u8 timeout_lta;
	__be16 misc_a;
	__be16 misc_b;
	u8 blocking;
	u8 padding;

Annotation

Implementation Notes