On Thu, Aug 6, 2009 at 11:57 PM, jing xiang<everxiang@xxxxxxxxx> wrote: > host set configuration command? could it make the following scenario: > 1. insmod g_ether.ko > 2. insmod g_file_storage.ko > 3. on host side, it see cdc ethernet + mass storage composite function > 5. rmmod g_ether.ko > 6. rmmod g_file_storage.ko > 7. insmod g_ether.ko > 8. insmod g_android.ko > 9. on host side, it see cdc ethernet + android adb composite function > > As I know in current composite.c it would reset config if > usb_add_config is called once, so seems such case is not possible if > insert more than one gadget driver? Theoretically it is possible to select the "required function(s)" of the device from the host provided the device has informed the functions supported thru the descriptors. IMO On Android/Linux USB gadget driver i don't look at it as "insmod" of "ko's" rather i would use "add config and function" of composite framework for this requirement. Thus creating the device functionality needed and advertise the configurations to the host. When the host need cdc ethernet + mass storage it should set 1st configuration and when it needs cdc ethernet + android adb it should set next configuration > Thanks > Jane > > On Wed, Aug 5, 2009 at 11:01 AM, Rajaram R <rajaram.officemail@xxxxxxxxx> wrote: >> >> On Tue, Aug 4, 2009 at 9:10 PM, jing xiang<everxiang@xxxxxxxxx> wrote: >> > Hi, >> > >> > Are there any way to use composite functions dynamically instead of >> > having to create new files to combine the functions together? e.g. >> > sometimes I want to combine mass storage and ethernet function, >> > sometimes composite with storage and acm function, and switch between >> > them on the run time. There's several gadget driver currently. Are >> > there any common way to use different combination of them more >> > flexible with current composite framework? >> >> Can this not be done using set configuration ? >> >> > >> > Thanks >> > Jane >> > -- >> > 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 >> > > -- 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