Re: Help on gadget udc

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Thu, 12 Jul 2007, Rajesh Srinivasan wrote:

> Hi All,
> 
> I am in teh process of developing a gadget driver for our peripheral 
> hardware. I have completed the non-gadget version (custom driver) for our 
> peripheral controller, and am about to start with the Gadget driver. Do we 
> have any guide as to the steps for creating a new udc driver?. I have a 
> torrent of small noobie questions like this.. 
> Once i insmod (or modprobe) my udc driver, the kernel never calls the 
> probe() function. (Whereas for the dummy-hcd, probe() is called as soon as 
> insmoded). As my structure and hardware initializations are done in the 
> probe().. When i do an insmod of teh file_storage, it straightaway calls 
> the usb_gadget_register_driver(), and as the software is not  initialized 
> yet, it crashes. What is the exact order / time when the probe is called 
> by the kernel? Any bits of info or tips will be quite helpful.

You have to register the controller as a platform device and the 
controller driver as a platform driver.  There was an email thread 
about this within the past week on the usb-storage mailing list:

https://lists.one-eyed-alien.net/pipermail/usb-storage/2007-July/date.html

Read the messages with "g_file_storage" in the subject line.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.