drivers/input/misc/iqs7222.c
Source file repositories/reference/linux-study-clean/drivers/input/misc/iqs7222.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/misc/iqs7222.c- Extension
.c- Size
- 76278 bytes
- Lines
- 3163
- 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/touchscreen.hlinux/interrupt.hlinux/kernel.hlinux/ktime.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/slab.hlinux/unaligned.h
Detected Declarations
struct iqs7222_event_descstruct iqs7222_reg_grp_descstruct iqs7222_dev_descstruct iqs7222_prop_descstruct iqs7222_privateenum iqs7222_reg_key_idenum iqs7222_reg_grp_idfunction iqs7222_irq_pollfunction iqs7222_hard_resetfunction iqs7222_force_commsfunction iqs7222_read_burstfunction iqs7222_read_wordfunction iqs7222_write_burstfunction iqs7222_write_wordfunction iqs7222_ati_triggerfunction iqs7222_dev_initfunction iqs7222_dev_infofunction iqs7222_gpio_selectfunction iqs7222_parse_propsfunction iqs7222_parse_eventfunction iqs7222_parse_cyclefunction iqs7222_parse_chanfunction fwnode_property_presentfunction fwnode_property_presentfunction iqs7222_parse_sldrfunction iqs7222_parse_tpadfunction iqs7222_parse_reg_grpfunction iqs7222_parse_allfunction iqs7222_reportfunction iqs7222_irqfunction iqs7222_probe
Annotated Snippet
struct iqs7222_event_desc {
const char *name;
u16 link;
u16 mask;
u16 val;
u16 strict;
u16 enable;
enum iqs7222_reg_key_id reg_key;
};
static const struct iqs7222_event_desc iqs7222_kp_events[] = {
{
.name = "event-prox",
.enable = IQS7222_EVENT_MASK_PROX,
.reg_key = IQS7222_REG_KEY_PROX,
},
{
.name = "event-touch",
.enable = IQS7222_EVENT_MASK_TOUCH,
.reg_key = IQS7222_REG_KEY_TOUCH,
},
};
static const struct iqs7222_event_desc iqs7222_sl_events[] = {
{ .name = "event-press", },
{
.name = "event-tap",
.mask = BIT(0),
.val = BIT(0),
.enable = BIT(0),
.reg_key = IQS7222_REG_KEY_TAP,
},
{
.name = "event-swipe-pos",
.mask = BIT(5) | BIT(1),
.val = BIT(1),
.enable = BIT(1),
.reg_key = IQS7222_REG_KEY_AXIAL,
},
{
.name = "event-swipe-neg",
.mask = BIT(5) | BIT(1),
.val = BIT(5) | BIT(1),
.enable = BIT(1),
.reg_key = IQS7222_REG_KEY_AXIAL,
},
{
.name = "event-flick-pos",
.mask = BIT(5) | BIT(2),
.val = BIT(2),
.enable = BIT(2),
.reg_key = IQS7222_REG_KEY_AXIAL,
},
{
.name = "event-flick-neg",
.mask = BIT(5) | BIT(2),
.val = BIT(5) | BIT(2),
.enable = BIT(2),
.reg_key = IQS7222_REG_KEY_AXIAL,
},
};
static const struct iqs7222_event_desc iqs7222_tp_events[] = {
{
.name = "event-press",
.link = BIT(7),
},
{
.name = "event-tap",
.link = BIT(0),
.mask = BIT(0),
.val = BIT(0),
.enable = BIT(0),
.reg_key = IQS7222_REG_KEY_TAP,
},
{
.name = "event-swipe-x-pos",
.link = BIT(2),
.mask = BIT(2) | BIT(1),
.val = BIT(2),
.strict = BIT(4),
.enable = BIT(1),
.reg_key = IQS7222_REG_KEY_AXIAL,
},
{
.name = "event-swipe-y-pos",
.link = BIT(3),
.mask = BIT(3) | BIT(1),
.val = BIT(3),
.strict = BIT(3),
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/touchscreen.h`.
- Detected declarations: `struct iqs7222_event_desc`, `struct iqs7222_reg_grp_desc`, `struct iqs7222_dev_desc`, `struct iqs7222_prop_desc`, `struct iqs7222_private`, `enum iqs7222_reg_key_id`, `enum iqs7222_reg_grp_id`, `function iqs7222_irq_poll`, `function iqs7222_hard_reset`, `function iqs7222_force_comms`.
- 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.