Re: Probe function not getting called
"subhash peddamallu" <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 9/12/07, Kaustubh Ashtekar <[email protected]> wrote: > I am working on an ARM9 (i.MX21) board. My task is to make the imx21 HCD > driver work with in board. I am using the 2.6.16 kernel. > > I am having a small problem. > > I have compiled my usb subsystem as modules and load them properly as given > in modules.dep. Though the driver gets loaded properly > without any errors during load time, there is no activity afterwards. I > checked /proc/interrupts and it does no show me any interrupt > registered for the usb. After some investigation using printk's I found out > that the probe function in the HCD doesn't get called at all. > > Under what circumstances does the probe function in my HCD driver gets > called? I read chapter 14, i.e. Linux device driver model from the > Linux Device Drivers book. However I could not still figure out why the > function is not getting called. > > This is the platform_driver structure which is being registered with the > call to platform_driver_register: > > static struct platform_driver imx21_hcd_driver = { > .driver = { > .name = (char *)hcd_name, > }, > .probe = imx21_probe, > .remove = imx21_remove, > .suspend = NULL, > .resume = NULL, > }; > > What could be the problem? In order to bind your driver to the device, both the device and driver must be registered with the driver model! So, are you registering the platform_device associated with your platform_driver? If not see 'arch/mips/au1000/common/platform.c' on how to add platform devices. Also, make sure to use matching 'name' for both platform_device and platform_driver so that 'match' function return successfully and eventually calls 'probe' function. > > I have just started working on Linux device drivers and have just the basic > knowledge of the device driver model or the USB subsystem. > > Thanks and Regards, > Ashtekar Kaustubh Thanks, Subhash > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > [email protected] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel