Re: composition switch design

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

 



On 1/20/10, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 20 Jan 2010, sai pavan wrote:
>
>> Is it possible to alter the config list at run time? i.e composite
>> driver at bootup /module load time registers 4 configurations and when
>> user selects a different configuration (via module param sysfs entry)
>> from device UI, composite layer should reset the present configuration
>> (just like disconnect) and when it re-enumerates it should send the
>> desired config as a first entry in config descriptors list.
>
> The composite framework doesn't include any code for doing this.  You
> would have to add it.  Rearranging the order in which the
> configuration descriptors are sent to the host shouldn't be hard.
>
> Alan Stern
>
>

This approach may not work if two configurations has common functions. say

config 1: mass storage + CDC-ACM
config 2: mass storage

The composite driver adds 1st configuration by calling usb_add_config,
which in turn would call mass storage bind method. The same bind
method would get called when 2nd configuration added. This duplicates
all buffers used in gadget function driver.

Does this mean we can not have a common function across multiple
configurations?

Thanks,
Pavan
--
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