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]

 



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? :-)

On Tue, Jun 14, 2011 at 10:27:35AM +0200, Michal Nazarewicz wrote:
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")

On Tue, 14 Jun 2011 10:31:07 +0200, Felipe Balbi <balbi@xxxxxx> wrote:
this is quite nasty :-p

I dunno.  Currently gadgets need to set-up functions during
initialisation and clean-up when unloading anyway.

soon enough we will have USB descriptors in XML haha :-p

That would be so cool!
It would also be when I switch to Windows mobile phone. ;)

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.)

To me, this sounds like a shortcut for a well written host-side driver.

It actually servers the purpose quite nicely.  Android has two functions
I can recall: mass storage and RNDIS. Each of those can be accompanied with
ADB (which is Androids debugging protocol of some sort) which user can turn
on and off.  This means, that there would be have to be four different
gadgets:

- mass storage
- mass storage + adb
- rndis
- rndis + adb

Now, writing composite gadgets is mostly just boilerplate.  You type tons
of code just to configure VID, PID pair and what configurations with what
functions you have.

With Android's composite, it all boils down to providing a structure with
VID, PID and a list of functions.

It has its own shortcomings (ie. no support for more then one
configuration and the need to specify gadgets in platform data) and
that's why I started thinking about the idea I'm mentioning now.

Oh well, we are spending effort discussing something which won't happen,
better stop :-p

Agreed. ;)

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