Re: from WHERE platform driver's probe is called?

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

 



Hi Sunil,

>>I am still not able to locate from WHERE this probe function is called and WHO calls it?

I can try to give you a snapshot of the function call trace. But if
you really want to get in depth detail, as Greg said look at the code
driver/base.

driver_register
->bus_add_driver->driver_attach->__driver_attach->driver_probe_device->really_probe->drv->probe

Basically when you register your platform driver, the platform
bus(platform_bus_type) will scan for the matching device. If you look
at the platform_bus_type structure you can find the match function
which does the matching of driver and device. Once it's found the
right device, it will attach the driver to the device.Look at the
function driver_attach. And if you look at the
platform_driver_register function, you can see that
"platform_drv_probe" function is assigned to driver.probe function.
And this probe function will finally call your registered platform
driver probe function.

Hope this helps.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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