On Mon, 8 Mar 2004, Andrew Zabolotny wrote: > On Sun, 07 Mar 2004 15:23:56 -0800 > David Brownell <[EMAIL PROTECTED]> wrote: > > > > Could you export some form of "controller-type" number (1 for > > > net2280, 3 for pxa, etc.) to simplify the bcdDevice assignment > > > for gadget drivers that use the same scheme as gadget-zero? > > I'd rather hold that off. Managing a number namespace for > > all developers is extra administrative overhead. I don't > > want to be maintaining such a list, or expect LANA to do so. > This is to avoid that ugly series of if (gadged_is_xxx) to compute bcdDevice > field. Even if someone is developing top secret UDC drivers, he could find a > second to send a single-line #define diff to, say, this list, to reserve some > number for his UDC.
Exactly. As a compromise, how about moving the code for those ugly if-statements into a separate subroutine inside the autoconf.c file (renamed from epautoconf.c)? That routine could return the "controller type" number (0 if the controller isn't recognized), and the gadget driver could call it when setting bcdDevice. That way there'd only be one spot to update when a new controller is added, and there'd be no more administative overhead than there is right now with managing gadget-zero. Given that Kconfig and Makefile have to updated anyway, this doesn't seem like a lot to add. Another option: The "controller type" number could be a preprocessor constant defined in Kconfig. 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
