Following is the definition of the probe function in the standard GPIO based MDIO bitbang driver
static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,const struct of_device_id* match)
I can't figure out the purpose of __devinit
in the above code.
Secondly when is the probe function called by the driver? May be when the driver is loaded itself. But it's not the part of driver init
functions. Correct me if I am wrong?
**The driver's init function calls pci_register_driver() which gives the kernel a list of devices it is able to service, along with a pointer to the probe() function. The kernel then calls the driver's probe() function once for each device.** That can be the case for the normal devices like USB and PCI. They are inherently discoverable, meaning they can signal the kernel like "hey i am here". What is the flow for the platform devices say on an i2c or mdc/mdio bus. – mdsingh Mar 13 '14 at 04:12