drivers/input/mouse/appletouch.c
Source file repositories/reference/linux-study-clean/drivers/input/mouse/appletouch.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/mouse/appletouch.c- Extension
.c- Size
- 26319 bytes
- Lines
- 998
- 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.
- 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/kernel.hlinux/errno.hlinux/slab.hlinux/module.hlinux/usb/input.h
Detected Declarations
struct atp_infostruct atpenum atp_status_bitsfunction packetsfunction atp_reinitfunction atp_calculate_absfunction aroundfunction atp_report_fingersfunction atp_status_checkfunction atp_detect_sizefunction atp_complete_geyser_1_2function atp_complete_geyser_3_4function atp_openfunction atp_closefunction atp_handle_geyserfunction atp_probefunction atp_disconnectfunction atp_recoverfunction atp_suspendfunction atp_resumefunction atp_reset_resume
Annotated Snippet
struct atp_info {
int xsensors; /* number of X sensors */
int xsensors_17; /* 17" models have more sensors */
int ysensors; /* number of Y sensors */
int xfact; /* X multiplication factor */
int yfact; /* Y multiplication factor */
int datalen; /* size of USB transfers */
void (*callback)(struct urb *); /* callback function */
int fuzz; /* fuzz touchpad generates */
};
static void atp_complete_geyser_1_2(struct urb *urb);
static void atp_complete_geyser_3_4(struct urb *urb);
static const struct atp_info fountain_info = {
.xsensors = 16,
.xsensors_17 = 26,
.ysensors = 16,
.xfact = 64,
.yfact = 43,
.datalen = 81,
.callback = atp_complete_geyser_1_2,
.fuzz = 16,
};
static const struct atp_info geyser1_info = {
.xsensors = 16,
.xsensors_17 = 26,
.ysensors = 16,
.xfact = 64,
.yfact = 43,
.datalen = 81,
.callback = atp_complete_geyser_1_2,
.fuzz = 16,
};
static const struct atp_info geyser2_info = {
.xsensors = 15,
.xsensors_17 = 20,
.ysensors = 9,
.xfact = 64,
.yfact = 43,
.datalen = 64,
.callback = atp_complete_geyser_1_2,
.fuzz = 0,
};
static const struct atp_info geyser3_info = {
.xsensors = 20,
.ysensors = 10,
.xfact = 64,
.yfact = 64,
.datalen = 64,
.callback = atp_complete_geyser_3_4,
.fuzz = 0,
};
static const struct atp_info geyser4_info = {
.xsensors = 20,
.ysensors = 10,
.xfact = 64,
.yfact = 64,
.datalen = 64,
.callback = atp_complete_geyser_3_4,
.fuzz = 0,
};
#define ATP_DEVICE(prod, info) \
{ \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
USB_DEVICE_ID_MATCH_INT_CLASS | \
USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
.idVendor = 0x05ac, /* Apple */ \
.idProduct = (prod), \
.bInterfaceClass = 0x03, \
.bInterfaceProtocol = 0x02, \
.driver_info = (unsigned long) &info, \
}
/*
* Table of devices (Product IDs) that work with this driver.
* (The names come from Info.plist in AppleUSBTrackpad.kext,
* According to Info.plist Geyser IV is the same as Geyser III.)
*/
static const struct usb_device_id atp_table[] = {
/* PowerBooks Feb 2005, iBooks G4 */
ATP_DEVICE(0x020e, fountain_info), /* FOUNTAIN ANSI */
ATP_DEVICE(0x020f, fountain_info), /* FOUNTAIN ISO */
ATP_DEVICE(0x030a, fountain_info), /* FOUNTAIN TP ONLY */
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/slab.h`, `linux/module.h`, `linux/usb/input.h`.
- Detected declarations: `struct atp_info`, `struct atp`, `enum atp_status_bits`, `function packets`, `function atp_reinit`, `function atp_calculate_abs`, `function around`, `function atp_report_fingers`, `function atp_status_check`, `function atp_detect_size`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: source implementation candidate.
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.