heh, it's just that you still have the possibility of a user turn
on the device with the USB cable already attached, right ? Then
this whole idea falls appart ;-)
On Tue, Jun 14, 2011 at 10:07:36AM +0200, Michal Nazarewicz wrote:
You can do a pull-up or something. Also, if you do rmmod g_foo followed
On Tue, 14 Jun 2011 10:14:57 +0200, Felipe Balbi <balbi@xxxxxx> wrote:
how do you know user has finished loading all the functions s/he wants ?
:-)
That would have to be checked when user wants to change the gadget.
How gadgets would be changed is another matter. It could simply be
a matter of loading a module or even done by writing a text
description to sysfs or somewhere.
Eg. a module would do something like:
mass_storage = usb_function_get("mass-storage");
rndis = usb_function_get("rndis")
ether = usb_function_get("ether")
and then on unload:
usb_function_put(...)
...
In my short encounter with Android's composite gadget, I noticed that
it has several configurations and makes it possible to enable or disable
individual functions. Whenever function is enabled or disabled the
framework checks which configuration best matches current set of
enabled functions and (if its not the current configuration) switches
to it. (And of course, I mean configuration not in USB sense.)
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html