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

From: David Brownell <[email-masked]>
Date: Wed, 24 Sep 2008 13:10:02 -0700

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