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

From: Steve Calfee
Date: Fri Sep 16 2011 - 14:22:11 EST


On Fri, Sep 16, 2011 at 10:18 AM, Sebastian Andrzej Siewior
<bigeasy@xxxxxxxxxxxxx> wrote:
> 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?
>
> Sebastian
> --

Hi,

To literally make a gadget that can emulate a hub (where it could
present port 1 as function x, port 2 as function y etc) would require
special hardware. The (bus speed) translations and (ack/nak) timings
are speced very tightly for hubs (see chapter 11 of the spec). Each
function would have its own usb bus address - otherwise one gadget
could not nak while another transfered data. Each bus address would
have to meet the spec in responding to all signaling.

Think about how the individual functions would announce themselves to
the host - when the port is enabled the available/speed pull ups would
have to be set, but other ports have to be in their old state.
Reset/Suspend signaling would have to be handled only by the selected
function.

So while it would make multiple function gadgets somewhat easier I
don't see how it is possible, do composite and/or compound gadgets
instead.

Regards, Steve
--
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/