drivers/video/fbdev/geode/lxfb_core.c

Source file repositories/reference/linux-study-clean/drivers/video/fbdev/geode/lxfb_core.c

File Facts

System
Linux kernel
Corpus path
drivers/video/fbdev/geode/lxfb_core.c
Extension
.c
Size
17321 bytes
Lines
681
Domain
Driver Families
Bucket
drivers/video
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 pci_driver lxfb_driver = {
	.name		= "lxfb",
	.id_table	= lxfb_id_table,
	.probe		= lxfb_probe,
	.remove		= lxfb_remove,
	.driver.pm	= &lxfb_pm_ops,
};

#ifndef MODULE
static int __init lxfb_setup(char *options)
{
	char *opt;

	if (!options || !*options)
		return 0;

	while ((opt = strsep(&options, ",")) != NULL) {
		if (!*opt)
			continue;

		if (!strcmp(opt, "noclear"))
			noclear = 1;
		else if (!strcmp(opt, "nopanel"))
			nopanel = 1;
		else if (!strcmp(opt, "nocrt"))
			nocrt = 1;
		else
			mode_option = opt;
	}

	return 0;
}
#endif

static int __init lxfb_init(void)
{
#ifndef MODULE
	char *option = NULL;
#endif

	if (fb_modesetting_disabled("lxfb"))
		return -ENODEV;

#ifndef MODULE
	if (fb_get_options("lxfb", &option))
		return -ENODEV;

	lxfb_setup(option);
#endif
	return pci_register_driver(&lxfb_driver);
}
static void __exit lxfb_cleanup(void)
{
	pci_unregister_driver(&lxfb_driver);
}

module_init(lxfb_init);
module_exit(lxfb_cleanup);

module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "video mode (<x>x<y>[-<bpp>][@<refr>])");

module_param(vram, int, 0);
MODULE_PARM_DESC(vram, "video memory size");

module_param(vt_switch, int, 0);
MODULE_PARM_DESC(vt_switch, "enable VT switch during suspend/resume");

MODULE_DESCRIPTION("Framebuffer driver for the AMD Geode LX");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes