-----Original Message----- From: Dave Hylands [mailto:dhylands@xxxxxxxxx] Sent: Thursday, April 19, 2012 1:13 PM To: Holmes, Michael A (Mike) Cc: kernelnewbies@xxxxxxxxxxxxxxxxx Subject: Re: Can request_firmware be called from a platform_driver ? Hi Mike, On Thu, Apr 19, 2012 at 9:42 AM, Holmes, Michael A (Mike) <Mike.Holmes@xxxxxxx> wrote: > ...snip... > Thanks, my module does use module_init, but now that this code is compiled as a module and not compiled into the kernel, I find that the .probe method is never called so I must still be missing something. > > I tried calling the probe directly in the init but this still fails with modprobe complaining. > > Should my .probe be called if my init only calls platform_driver_register and this module is loaded with modprobe rather than by the kernel booting? > And really I only want to call the probe method so that I can get hold of a struct platform_device *pdev to call firmware_request() with, maybe I am going about this completely incorrectly? In order for your probe routine to be called there has to be both a device and driver registered with the same name. Normally the device is registered in the board init, and the driver does the call to register the driver in its init routine. When a match is found, that then causes the probe routine to be called. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com >>>>>>> Thank you again Dave, you are a genius! All the little pieces have now fallen into place. I even see why I was not getting the mdev events originally; I was copying code that set up a driver which is only 1/2 the picture, it is when the device matches a driver later on that the mdev events should be triggered. platform.txt now makes sense to me, it was opaque before, the answer is written there clearly, but I didn't see it in all the times I had read it. Mike _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies