drivers/input/touchscreen/atmel_mxt_ts.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/atmel_mxt_ts.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/atmel_mxt_ts.c- Extension
.c- Size
- 82987 bytes
- Lines
- 3451
- 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/dmi.hlinux/module.hlinux/init.hlinux/completion.hlinux/delay.hlinux/firmware.hlinux/i2c.hlinux/input/mt.hlinux/input/touchscreen.hlinux/interrupt.hlinux/irq.hlinux/of.hlinux/property.hlinux/slab.hlinux/regulator/consumer.hlinux/gpio/consumer.hlinux/unaligned.hmedia/v4l2-device.hmedia/v4l2-ioctl.hmedia/videobuf2-v4l2.hmedia/videobuf2-vmalloc.hdt-bindings/input/atmel-maxtouch.h
Detected Declarations
struct t7_configstruct t9_rangestruct t37_debugstruct mxt_infostruct mxt_objectstruct mxt_dbgstruct mxt_cfgstruct mxt_datastruct mxt_vb2_bufferenum t100_typeenum v4l_dbg_inputsenum mxt_suspend_modefunction mxt_obj_sizefunction mxt_obj_instancesfunction mxt_object_readablefunction mxt_dump_messagefunction mxt_wait_for_completionfunction mxt_bootloader_readfunction mxt_bootloader_writefunction mxt_lookup_bootloader_addressfunction mxt_probe_bootloaderfunction mxt_get_bootloader_versionfunction mxt_check_bootloaderfunction mxt_send_bootloader_cmdfunction mxt_wakeup_togglefunction __mxt_read_regfunction __mxt_write_regfunction mxt_write_regfunction mxt_get_objectfunction mxt_proc_t6_messagesfunction mxt_write_objectfunction mxt_input_buttonfunction mxt_input_syncfunction mxt_proc_t9_messagefunction mxt_proc_t15_messagesfunction mxt_proc_t97_messagesfunction mxt_proc_t100_messagefunction mxt_proc_messagefunction mxt_read_and_process_messagesfunction mxt_process_messages_t44function mxt_process_messages_until_invalidfunction mxt_process_messagesfunction mxt_interruptfunction mxt_t6_commandfunction mxt_acquire_irqfunction mxt_soft_resetfunction mxt_update_crcfunction mxt_calc_crc24
Annotated Snippet
struct t7_config {
u8 idle;
u8 active;
} __packed;
#define MXT_POWER_CFG_RUN 0
#define MXT_POWER_CFG_DEEPSLEEP 1
/* MXT_TOUCH_MULTI_T9 field */
#define MXT_T9_CTRL 0
#define MXT_T9_XSIZE 3
#define MXT_T9_YSIZE 4
#define MXT_T9_ORIENT 9
#define MXT_T9_RANGE 18
/* MXT_TOUCH_MULTI_T9 status */
#define MXT_T9_UNGRIP BIT(0)
#define MXT_T9_SUPPRESS BIT(1)
#define MXT_T9_AMP BIT(2)
#define MXT_T9_VECTOR BIT(3)
#define MXT_T9_MOVE BIT(4)
#define MXT_T9_RELEASE BIT(5)
#define MXT_T9_PRESS BIT(6)
#define MXT_T9_DETECT BIT(7)
struct t9_range {
__le16 x;
__le16 y;
} __packed;
/* MXT_TOUCH_MULTI_T9 orient */
#define MXT_T9_ORIENT_SWITCH BIT(0)
#define MXT_T9_ORIENT_INVERTX BIT(1)
#define MXT_T9_ORIENT_INVERTY BIT(2)
/* MXT_SPT_COMMSCONFIG_T18 */
#define MXT_COMMS_CTRL 0
#define MXT_COMMS_CMD 1
#define MXT_COMMS_RETRIGEN BIT(6)
/* MXT_DEBUG_DIAGNOSTIC_T37 */
#define MXT_DIAGNOSTIC_PAGEUP 0x01
#define MXT_DIAGNOSTIC_DELTAS 0x10
#define MXT_DIAGNOSTIC_REFS 0x11
#define MXT_DIAGNOSTIC_SIZE 128
#define MXT_FAMILY_1386 160
#define MXT1386_COLUMNS 3
#define MXT1386_PAGES_PER_COLUMN 8
struct t37_debug {
#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37
u8 mode;
u8 page;
u8 data[MXT_DIAGNOSTIC_SIZE];
#endif
};
/* Define for MXT_GEN_COMMAND_T6 */
#define MXT_BOOT_VALUE 0xa5
#define MXT_RESET_VALUE 0x01
#define MXT_BACKUP_VALUE 0x55
/* T100 Multiple Touch Touchscreen */
#define MXT_T100_CTRL 0
#define MXT_T100_CFG1 1
#define MXT_T100_TCHAUX 3
#define MXT_T100_XSIZE 9
#define MXT_T100_XRANGE 13
#define MXT_T100_YSIZE 20
#define MXT_T100_YRANGE 24
#define MXT_T100_CFG_SWITCHXY BIT(5)
#define MXT_T100_CFG_INVERTY BIT(6)
#define MXT_T100_CFG_INVERTX BIT(7)
#define MXT_T100_TCHAUX_VECT BIT(0)
#define MXT_T100_TCHAUX_AMPL BIT(1)
#define MXT_T100_TCHAUX_AREA BIT(2)
#define MXT_T100_DETECT BIT(7)
#define MXT_T100_TYPE_MASK 0x70
enum t100_type {
MXT_T100_TYPE_FINGER = 1,
MXT_T100_TYPE_PASSIVE_STYLUS = 2,
MXT_T100_TYPE_HOVERING_FINGER = 4,
MXT_T100_TYPE_GLOVE = 5,
MXT_T100_TYPE_LARGE_TOUCH = 6,
};
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/dmi.h`, `linux/module.h`, `linux/init.h`, `linux/completion.h`, `linux/delay.h`, `linux/firmware.h`, `linux/i2c.h`.
- Detected declarations: `struct t7_config`, `struct t9_range`, `struct t37_debug`, `struct mxt_info`, `struct mxt_object`, `struct mxt_dbg`, `struct mxt_cfg`, `struct mxt_data`, `struct mxt_vb2_buffer`, `enum t100_type`.
- 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.