drivers/input/touchscreen/wm97xx-core.c
Source file repositories/reference/linux-study-clean/drivers/input/touchscreen/wm97xx-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/touchscreen/wm97xx-core.c- Extension
.c- Size
- 22334 bytes
- Lines
- 899
- Domain
- Driver Families
- Bucket
- drivers/input
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/export.hlinux/module.hlinux/moduleparam.hlinux/kernel.hlinux/init.hlinux/delay.hlinux/string.hlinux/proc_fs.hlinux/pm.hlinux/interrupt.hlinux/bitops.hlinux/mfd/wm97xx.hlinux/workqueue.hlinux/wm97xx.hlinux/uaccess.hlinux/io.hlinux/slab.h
Detected Declarations
function wm97xx_reg_readfunction wm97xx_reg_writefunction wm97xx_read_aux_adcfunction wm97xx_get_gpiofunction wm97xx_set_gpiofunction wm97xx_config_gpiofunction wm97xx_set_suspend_modefunction wm97xx_pen_interruptfunction wm97xx_init_pen_irqfunction wm97xx_read_samplesfunction wm97xx_ts_readerfunction wm97xx_ts_input_openfunction wm97xx_ts_input_closefunction wm97xx_register_touchfunction wm97xx_unregister_touchfunction _wm97xx_probefunction wm97xx_remove_batteryfunction wm97xx_add_batteryfunction wm97xx_probefunction wm97xx_removefunction wm97xx_mfd_probefunction wm97xx_mfd_removefunction wm97xx_suspendfunction wm97xx_resumefunction wm97xx_register_mach_opsfunction wm97xx_unregister_mach_opsfunction wm97xx_initfunction wm97xx_exitmodule init wm97xx_initexport wm97xx_reg_readexport wm97xx_reg_writeexport wm97xx_read_aux_adcexport wm97xx_get_gpioexport wm97xx_set_gpioexport wm97xx_config_gpioexport wm97xx_set_suspend_modeexport wm97xx_register_mach_opsexport wm97xx_unregister_mach_ops
Annotated Snippet
static struct device_driver wm97xx_driver = {
.name = "wm97xx-ts",
#ifdef CONFIG_AC97_BUS
.bus = &ac97_bus_type,
#endif
.owner = THIS_MODULE,
.probe = wm97xx_probe,
.remove = wm97xx_remove,
.pm = pm_sleep_ptr(&wm97xx_pm_ops),
};
static struct platform_driver wm97xx_mfd_driver = {
.driver = {
.name = "wm97xx-ts",
.pm = pm_sleep_ptr(&wm97xx_pm_ops),
},
.probe = wm97xx_mfd_probe,
.remove = wm97xx_mfd_remove,
};
static int __init wm97xx_init(void)
{
int ret;
ret = platform_driver_register(&wm97xx_mfd_driver);
if (ret)
return ret;
if (IS_BUILTIN(CONFIG_AC97_BUS))
ret = driver_register(&wm97xx_driver);
return ret;
}
static void __exit wm97xx_exit(void)
{
if (IS_BUILTIN(CONFIG_AC97_BUS))
driver_unregister(&wm97xx_driver);
platform_driver_unregister(&wm97xx_mfd_driver);
}
module_init(wm97xx_init);
module_exit(wm97xx_exit);
/* Module information */
MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>");
MODULE_DESCRIPTION("WM97xx Core - Touch Screen / AUX ADC / GPIO Driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/export.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/init.h`, `linux/delay.h`, `linux/string.h`, `linux/proc_fs.h`.
- Detected declarations: `function wm97xx_reg_read`, `function wm97xx_reg_write`, `function wm97xx_read_aux_adc`, `function wm97xx_get_gpio`, `function wm97xx_set_gpio`, `function wm97xx_config_gpio`, `function wm97xx_set_suspend_mode`, `function wm97xx_pen_interrupt`, `function wm97xx_init_pen_irq`, `function wm97xx_read_samples`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: pattern 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.