Re: generate one module from multiple object files (was: Re: [PATCH 2/2] usb: gadget: convert all users to the new udc)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux