On Wed, 30 Jul 2003, David Brownell wrote:

> >      That is, an ioctl call provides 
> > the gadget driver with a descriptor for a block device or a regular file, 
> > which the driver then uses.  (Also, that means I can just copy the loop 
> > driver code :-)
> 
> A module parameter could be even simpler.  Eventually those are
> supposed to show up in sysfs, and there's no confusion about
> initialization:  the parameter is available before the driver
> binds to the controller.  Which is good, since as soon as it
> successfully binds, the gadget driver must be fully functional...

I take your point.  Using a module parameter does appear to be the 
simplest solution.

> > Doing the same thing via sysfs would come down to having a writeable 
> > attribute file where a user process could place a pathname for the 
> > device/file.  It ought to work just as well, assuming that gadgets are 
> > registered in the sysfs file system.
> 
> I have a patch, not yet submitted, that makes the gadget controller
> appear as a sysfs class -- exactly like Greg's "usb_host" class,
> with the debug files sitting there.  It's done for net2280, and
> likely the pxa2xx_udc will choose the same answer ... though I may
> first rip out the class support, it doesn't seem useful.
> 
> The gadget itself is a child of the controller, just like the root
> hub is (on the host side).  You can certainly assume the gadget
> will appear in sysfs.  But it won't be accessible to the gadget
> driver until after binding, which means it can't be used for any
> information that's needed to initialize any device configurations.
> 
> It'd be more useful to you maybe if gadget _drivers_ were in sysfs.
> But that can't be done without a sysfs "bus", it seems.

That's sort of what I had in mind.  But you must already have a bus 
available -- how is the USB controller connected?  With a net2280, for 
instance, presumably it's a device on the PCI bus.  The gadget could be a 
child of the controller, and that would give you a place for the driver.
Another project for the future, perhaps?

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to