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.

Dependency Surface

Detected Declarations

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

Implementation Notes