Re: [PATCH] usb: add Freescale QE/CPM USB peripheral controller driver

From: David Brownell
Date: Wed Sep 24 2008 - 16:48:46 EST


On Thursday 28 August 2008, Arnd Bergmann wrote:
> > +/*-------------------------------------------------------------------------
> > +     Gadget driver register and unregister.
> > + --------------------------------------------------------------------------*/
> > +int usb_gadget_register_driver(struct usb_gadget_driver *driver)
> > +EXPORT_SYMBOL(usb_gadget_register_driver);
> > +
> > +int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
> > +EXPORT_SYMBOL(usb_gadget_unregister_driver);
>
> Not addressing this driver in particular, but the USB gadget layer in
> general: This is a horrible interface, since every gadget driver exports
> the same symbols,

Bad terminology. Gadget drivers are what sit on TOP of peripheral
controller drivers ... only peripheral controller drivers touch the
actual hardware registers. They export an abstract "gadget" interface.

Gadget drivers are what talk *to* that abstract interface.


> you can never build a kernel that includes more than
> one gadget driver. Even if the drivers are all built as modules, simply
> loading one of them prevents loading another one.

That's never been a particular requirement. Systems won't get
USB branding if they have more than one USB peripheral (upstream)
port. Supporting more than one type of controller hardware is
at best a pretty esoteric configuration.

If you really want to see such stuff ... -ENOPATCH. :)

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/