drivers/input/mouse/elantech.h

Source file repositories/reference/linux-study-clean/drivers/input/mouse/elantech.h

File Facts

System
Linux kernel
Corpus path
drivers/input/mouse/elantech.h
Extension
.h
Size
4825 bytes
Lines
206
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 finger_pos {
	unsigned int x;
	unsigned int y;
};

struct elantech_device_info {
	unsigned char capabilities[3];
	unsigned char samples[3];
	unsigned char debug;
	unsigned char hw_version;
	unsigned char pattern;
	unsigned int fw_version;
	unsigned int ic_version;
	unsigned int product_id;
	unsigned int x_min;
	unsigned int y_min;
	unsigned int x_max;
	unsigned int y_max;
	unsigned int x_res;
	unsigned int y_res;
	unsigned int x_traces;
	unsigned int y_traces;
	unsigned int width;
	unsigned int bus;
	bool paritycheck;
	bool jumpy_cursor;
	bool reports_pressure;
	bool crc_enabled;
	bool set_hw_resolution;
	bool has_trackpoint;
	bool has_middle_button;
	int (*send_cmd)(struct psmouse *psmouse, unsigned char c,
			unsigned char *param);
};

struct elantech_data {
	struct input_dev *tp_dev;	/* Relative device for trackpoint */
	char tp_phys[32];
	unsigned char reg_07;
	unsigned char reg_10;
	unsigned char reg_11;
	unsigned char reg_20;
	unsigned char reg_21;
	unsigned char reg_22;
	unsigned char reg_23;
	unsigned char reg_24;
	unsigned char reg_25;
	unsigned char reg_26;
	unsigned int single_finger_reports;
	unsigned int y_max;
	unsigned int width;
	struct finger_pos mt[ETP_MAX_FINGERS];
	unsigned char parity[256];
	struct elantech_device_info info;
	void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate);
};

int elantech_detect(struct psmouse *psmouse, bool set_properties);
int elantech_init_ps2(struct psmouse *psmouse);

#ifdef CONFIG_MOUSE_PS2_ELANTECH
int elantech_init(struct psmouse *psmouse);
#else
static inline int elantech_init(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_ELANTECH */

int elantech_init_smbus(struct psmouse *psmouse);

#endif

Annotation

Implementation Notes