drivers/input/touchscreen/exc3000.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/exc3000.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/exc3000.c- Extension
.c- Size
- 11646 bytes
- Lines
- 478
- 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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/bitops.hlinux/delay.hlinux/device.hlinux/gpio/consumer.hlinux/i2c.hlinux/input.hlinux/input/mt.hlinux/input/touchscreen.hlinux/interrupt.hlinux/module.hlinux/of.hlinux/regulator/consumer.hlinux/sizes.hlinux/timer.hlinux/unaligned.h
Detected Declarations
struct eeti_dev_infostruct exc3000_dataenum eeti_dev_idfunction exc3000_report_slotsfunction exc3000_timerfunction exc3000_schedule_timerfunction exc3000_shutdown_timerfunction exc3000_read_framefunction exc3000_handle_mt_eventfunction exc3000_interruptfunction exc3000_vendor_data_requestfunction fw_version_showfunction model_showfunction type_showfunction exc3000_probe
Annotated Snippet
struct eeti_dev_info {
const char *name;
int max_xy;
};
enum eeti_dev_id {
EETI_EXC3000,
EETI_EXC80H60,
EETI_EXC80H84,
EETI_EXC81W32,
};
static struct eeti_dev_info exc3000_info[] = {
[EETI_EXC3000] = {
.name = "EETI EXC3000 Touch Screen",
.max_xy = SZ_4K - 1,
},
[EETI_EXC80H60] = {
.name = "EETI EXC80H60 Touch Screen",
.max_xy = SZ_16K - 1,
},
[EETI_EXC80H84] = {
.name = "EETI EXC80H84 Touch Screen",
.max_xy = SZ_16K - 1,
},
[EETI_EXC81W32] = {
.name = "EETI EXC81W32 Touch Screen",
.max_xy = SZ_16K - 1,
},
};
struct exc3000_data {
struct i2c_client *client;
const struct eeti_dev_info *info;
struct input_dev *input;
struct touchscreen_properties prop;
struct gpio_desc *reset;
struct timer_list timer;
u8 buf[2 * EXC3000_LEN_FRAME];
struct completion wait_event;
struct mutex query_lock;
};
static void exc3000_report_slots(struct input_dev *input,
struct touchscreen_properties *prop,
const u8 *buf, int num)
{
for (; num--; buf += EXC3000_LEN_POINT) {
if (buf[0] & BIT(0)) {
input_mt_slot(input, buf[1]);
input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
touchscreen_report_pos(input, prop,
get_unaligned_le16(buf + 2),
get_unaligned_le16(buf + 4),
true);
}
}
}
static void exc3000_timer(struct timer_list *t)
{
struct exc3000_data *data = timer_container_of(data, t, timer);
input_mt_sync_frame(data->input);
input_sync(data->input);
}
static inline void exc3000_schedule_timer(struct exc3000_data *data)
{
mod_timer(&data->timer, jiffies + msecs_to_jiffies(EXC3000_TIMEOUT_MS));
}
static void exc3000_shutdown_timer(void *timer)
{
timer_shutdown_sync(timer);
}
static int exc3000_read_frame(struct exc3000_data *data, u8 *buf)
{
struct i2c_client *client = data->client;
int ret;
ret = i2c_master_send(client, "'", 2);
if (ret < 0)
return ret;
if (ret != 2)
return -EIO;
ret = i2c_master_recv(client, buf, EXC3000_LEN_FRAME);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/bitops.h`, `linux/delay.h`, `linux/device.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/input.h`, `linux/input/mt.h`.
- Detected declarations: `struct eeti_dev_info`, `struct exc3000_data`, `enum eeti_dev_id`, `function exc3000_report_slots`, `function exc3000_timer`, `function exc3000_schedule_timer`, `function exc3000_shutdown_timer`, `function exc3000_read_frame`, `function exc3000_handle_mt_event`, `function exc3000_interrupt`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.