platform_driver_register() questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe platform_driver_register() was added to the kernel in 2.6.15.

Can anyone tell me how it works ?  What its really for ?

It seems to be used to load drivers for non-plug-and-play hardware. Is
this correct ?

Having said that its platform_driver structure has 

static struct platform_driver my_driver = {
	.probe		= my_probe,
	.remove		= my_remove,
	.suspend		= my_suspend,
	.resume		= my_resume,
	.driver		= {
		.name	= (char *) my_driver_name,
		.owner	= THIS_MODULE,
	},
};

...a probe function.  What action makes this probe function execute ?

What makes the remove function execute ?

I wrote a simple test driver but the remove() got called straight after
the probe().

Are there any actions the probe() function HAS to do ?

Sorry for all the questions but I'm a bit lost.
Thanks
dom


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux