Re: [PATCH] usb: add new usb gadget for ACM and mass storage

From: Alan Stern
Date: Fri Sep 16 2011 - 17:22:35 EST


On Fri, 16 Sep 2011, Sebastian Andrzej Siewior wrote:

> * Greg KH | 2011-09-09 11:43:54 [-0700]:
>
> >So we can expect more patches like this adding all of the possible
> >permutations of the different gadget devices?
> >
> >If so, ick, I thought that the work that was done was to prevent this
> >from happening, oh well :(
>
> Would it be possible to come up with a gadget-hub driver which can have
> multiple gadget attached? This should get rid of this kind of gadget
> drivers, right?

Instead of implementing a hub, it might be possible to redo the
composite driver in such a way that the individual function drivers are
added as separate modules at runtime, rather than all bound together at
compile time.

The details would be tricky, but I think it could be done. One
important point is that somehow you have to inform the composite core
when all the function drivers have been loaded and initialized --
otherwise there's no way to tell when it's safe to enable the pull-ups
and connect to the host.

Alan Stern

--
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/