from WHERE platform driver's probe is called?
Hello, I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum.http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050 For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information. I am still not able to locate from WHERE this probe function is called and WHO calls it?Can someone please point to source code or some other document related to this? Thanks,Sunil.
On Fri, Nov 21, 2014 at 6:46 PM, Sunil Shahu <sunil.rockon@yahoo.in> wrote:
Hello,
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
I am still not able to locate from WHERE this probe function is called and WHO calls it? Can someone please point to source code or some other document related to this?
i am also not exactly sure, but i think the individual drivers probe function is called from platform_drv_probe() of platform.c thanks sudip
Thanks, Sunil.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Fri, Nov 21, 2014 at 3:16 PM, Sunil Shahu <sunil.rockon@yahoo.in> wrote:
Hello,
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
I am still not able to locate from WHERE this probe function is called and WHO calls it? Can someone please point to source code or some other document related to this?
Does dump_stack() help? Daniel.
This link can answer your ques: http://stackoverflow.com/questions/22722520/who-calls-probe-function-in-driv... Thanks. On Fri, Nov 21, 2014 at 6:46 PM, Sunil Shahu <sunil.rockon@yahoo.in> wrote:
Hello,
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
I am still not able to locate from WHERE this probe function is called and WHO calls it? Can someone please point to source code or some other document related to this?
Thanks, Sunil.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Fri, Nov 21, 2014 at 01:16:21PM +0000, Sunil Shahu wrote:
Hello,
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
I am still not able to locate from WHERE this probe function is called and WHO calls it?
It all starts by your own driver, you end up calling it yourself, through the driver core callbacks.
Can someone please point to source code or some other document related to this?
Can you please provide a specific example of what you are wanting to see the callback chain for? What driver are you asking about? Have you read the platform code in drivers/base/ ? thanks, greg k-h
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.
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and >>following forum.
http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050 <http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050>
I would ask *what* is platform device driver ? and what is the *difference* between a platform device driver and a normal device driver ? The answer here explains it extremely well : http://stackoverflow.com/questions/15610570/what-is-the-difference-between-p...
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
This will help: http://code.woboq.org/linux/linux/drivers/base/platform.c.html#platform_driv...
I am still not able to locate from WHERE this probe function is called and WHO calls it? Can someone please point to source code or some other document related to this?
Review this article carefully: https://coherentmusings.wordpress.com/2013/12/13/how-to-write-a-platform-dev... Have fun :) Aruna On Fri, Nov 21, 2014 at 8:16 AM, Sunil Shahu <sunil.rockon@yahoo.in> wrote:
Hello,
I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050
For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information.
I am still not able to locate from WHERE this probe function is called and WHO calls it? Can someone please point to source code or some other document related to this?
Thanks, Sunil.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (7)
-
Aruna Hewapathirane -
Daniel Baluta -
Greg KH -
subin gangadharan -
Sudip Mukherjee -
Sunil Shahu -
Varka Bhadram