drivers/input/touchscreen/tsc2007.h

Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/tsc2007.h

File Facts

System
Linux kernel
Corpus path
drivers/input/touchscreen/tsc2007.h
Extension
.h
Size
2562 bytes
Lines
103
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 ts_event {
	u16	x;
	u16	y;
	u16	z1, z2;
};

struct tsc2007 {
	struct input_dev	*input;
	char			phys[32];

	struct i2c_client	*client;

	struct touchscreen_properties prop;
	u16			model;
	u16			x_plate_ohms;
	u16			max_rt;
	unsigned long		poll_period; /* in jiffies */
	int			fuzzx;
	int			fuzzy;
	int			fuzzz;

	struct gpio_desc	*gpiod;
	int			irq;

	wait_queue_head_t	wait;
	bool			stopped;

	int			(*get_pendown_state)(struct device *);
	void			(*clear_penirq)(void);

	struct mutex		mlock;
};

int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd);
u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc);
bool tsc2007_is_pen_down(struct tsc2007 *ts);

#if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2007_IIO)
/* defined in tsc2007_iio.c */
int tsc2007_iio_configure(struct tsc2007 *ts);
#else
static inline int tsc2007_iio_configure(struct tsc2007 *ts)
{
	return 0;
}
#endif /* CONFIG_TOUCHSCREEN_TSC2007_IIO */

#endif /* _TSC2007_H */

Annotation

Implementation Notes