drivers/input/touchscreen/iqs7211.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/iqs7211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/iqs7211.c- Extension
.c- Size
- 60409 bytes
- Lines
- 2550
- 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/bits.hlinux/delay.hlinux/device.hlinux/err.hlinux/gpio/consumer.hlinux/i2c.hlinux/input.hlinux/input/mt.hlinux/input/touchscreen.hlinux/interrupt.hlinux/iopoll.hlinux/kernel.hlinux/list.hlinux/module.hlinux/of_device.hlinux/property.hlinux/slab.hlinux/unaligned.h
Detected Declarations
struct iqs7211_reg_field_descstruct iqs7211_event_descstruct iqs7211_dev_descstruct iqs7211_prop_descstruct iqs7211_ver_infostruct iqs7211_touch_datastruct iqs7211_tp_configstruct iqs7211_privateenum iqs7211_dev_idenum iqs7211_comms_modeenum iqs7211_reg_key_idenum iqs7211_reg_grp_idfunction iqs7211_irq_pollfunction iqs7211_hard_resetfunction iqs7211_force_commsfunction iqs7211_read_burstfunction iqs7211_read_wordfunction iqs7211_write_burstfunction iqs7211_write_wordfunction iqs7211_start_commsfunction iqs7211_init_devicefunction list_for_each_entryfunction iqs7211_add_fieldfunction list_for_each_entryfunction iqs7211_parse_propsfunction iqs7211_parse_eventfunction iqs7211_parse_cyclesfunction iqs7211_parse_tpfunction iqs7211_parse_alpfunction iqs7211_parse_reg_grpfunction iqs7211_register_kpfunction iqs7211_register_tpfunction iqs7211_reportfunction iqs7211_irqfunction iqs7211_suspendfunction iqs7211_resumefunction fw_info_showfunction iqs7211_probe
Annotated Snippet
struct iqs7211_reg_field_desc {
struct list_head list;
u8 addr;
u16 mask;
u16 val;
};
enum iqs7211_reg_key_id {
IQS7211_REG_KEY_NONE,
IQS7211_REG_KEY_PROX,
IQS7211_REG_KEY_TOUCH,
IQS7211_REG_KEY_TAP,
IQS7211_REG_KEY_HOLD,
IQS7211_REG_KEY_PALM,
IQS7211_REG_KEY_AXIAL_X,
IQS7211_REG_KEY_AXIAL_Y,
IQS7211_REG_KEY_RESERVED
};
enum iqs7211_reg_grp_id {
IQS7211_REG_GRP_TP,
IQS7211_REG_GRP_BTN,
IQS7211_REG_GRP_ALP,
IQS7211_REG_GRP_SYS,
IQS7211_NUM_REG_GRPS
};
static const char * const iqs7211_reg_grp_names[IQS7211_NUM_REG_GRPS] = {
[IQS7211_REG_GRP_TP] = "trackpad",
[IQS7211_REG_GRP_BTN] = "button",
[IQS7211_REG_GRP_ALP] = "alp",
};
static const u16 iqs7211_reg_grp_masks[IQS7211_NUM_REG_GRPS] = {
[IQS7211_REG_GRP_TP] = IQS7211_EVENT_MASK_GSTR,
[IQS7211_REG_GRP_BTN] = IQS7211_EVENT_MASK_BTN,
[IQS7211_REG_GRP_ALP] = IQS7211_EVENT_MASK_ALP,
};
struct iqs7211_event_desc {
const char *name;
u16 mask;
u16 enable;
enum iqs7211_reg_grp_id reg_grp;
enum iqs7211_reg_key_id reg_key;
};
static const struct iqs7211_event_desc iqs7210a_kp_events[] = {
{
.mask = BIT(10),
.enable = BIT(13) | BIT(12),
.reg_grp = IQS7211_REG_GRP_ALP,
},
{
.name = "event-prox",
.mask = BIT(2),
.enable = BIT(5) | BIT(4),
.reg_grp = IQS7211_REG_GRP_BTN,
.reg_key = IQS7211_REG_KEY_PROX,
},
{
.name = "event-touch",
.mask = BIT(3),
.enable = BIT(5) | BIT(4),
.reg_grp = IQS7211_REG_GRP_BTN,
.reg_key = IQS7211_REG_KEY_TOUCH,
},
{
.name = "event-tap",
.mask = BIT(0),
.enable = BIT(0),
.reg_grp = IQS7211_REG_GRP_TP,
.reg_key = IQS7211_REG_KEY_TAP,
},
{
.name = "event-hold",
.mask = BIT(1),
.enable = BIT(1),
.reg_grp = IQS7211_REG_GRP_TP,
.reg_key = IQS7211_REG_KEY_HOLD,
},
{
.name = "event-swipe-x-neg",
.mask = BIT(2),
.enable = BIT(2),
.reg_grp = IQS7211_REG_GRP_TP,
.reg_key = IQS7211_REG_KEY_AXIAL_X,
},
{
.name = "event-swipe-x-pos",
Annotation
- Immediate include surface: `linux/bits.h`, `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/input.h`, `linux/input/mt.h`.
- Detected declarations: `struct iqs7211_reg_field_desc`, `struct iqs7211_event_desc`, `struct iqs7211_dev_desc`, `struct iqs7211_prop_desc`, `struct iqs7211_ver_info`, `struct iqs7211_touch_data`, `struct iqs7211_tp_config`, `struct iqs7211_private`, `enum iqs7211_dev_id`, `enum iqs7211_comms_mode`.
- 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.