On Tue, 9 Mar 2004, David Brownell wrote:
> I didn't notice a followup to my post of yesterday talking about
> needing better bcdDevice conventions. The current one only
> allocates 9 numbers for controller numbers ... almost kaput.
I meant to comment on that...
When I started using that VV.KC convention, where VV is a two-digit
version number, K indicates the kernel version, and C the controller chip,
I realized that 9 or 10 different values for C wouldn't be enough. There
were two possible ways to deal with the problem:
Steal some of the bits from K to use as an extension for C.
Not very elegant, but since this is all arbitrary anyway
who cares?
Figure that when the crunch got really bad, we wouldn't care
about supporting Linux 2.4 any more. Then the K field wouldn't
matter.
Ultimately neither of these is really satisfactory. The fact is, we
shouldn't be trying to encode all this information in the bcdDevice
field in the first place.
> There are other parts of autoconfig that don't relate to endpoints,
> and the "epautoconf.h" you saw should vanish ... the two declarations
> belong in <linux/usb_gadget.h>, nothing else is endpoint-specific.
Endpoint selection is the most critical, though, and perhaps also the most
amenable to an automated solution.
Here's something else to consider for composite gadget drivers. The main
program will need to know at all times which function driver has allocated
which endpoint. That information is needed to dispatch control messages
with RECIP_ENDPOINT. The simplest way to do this may be for the main
program to set up a hook intercepting calls to usb_ep_enable() and
usb_ep_disable().
Alan Stern
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel