Re: About gadget configfs

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

 



W dniu 04.05.2014 09:48, Peter Chen pisze:
Hi Sebastian & Andrzej,

<snip>


My questions:


<snip>

- How to choose gserial? I tried to remove the configuration
of mass storage, but both of configurations have been removed

root@freescale /sys/kernel/config/usb_gadget/g1$ rm -rf
configs/c.2/mass_storage
.1/
configfs-gadget gadget: unbind function 'gser'/be822b80
configfs-gadget gadget: unbind function 'Mass Storage Function'/be822d80


When you remove a symbolic link pointing at a function when the gadget is bound
(active), then the gadget is unbound by design.
There is no perfect solution to this problem. When the gadget is bound
the host has already enumerated it and selected the gadget's configuration.
What would it mean if gadget's identity/composition changed? As far as
I know the USB standard does not allow changig device's identity and/or
structure (that is: what configurations and functions there are) on the fly.
So a sensible solution here is to force gadget's unbind so it can be
bound again with new identity/composition.

And it is not device's (gadget's) role at all to decide which configuration
to activate. USB is a host-centric bus and nothing happens on the bus
without host's initiative. It is totally up to the host which configuration
to select. The host must know somehow which one to choose. Please be aware
that some proprietary operating systems never ask for configurations
other than the one at index 0.

You can have more than one function (interface from the host's point of view)
in one configuration and the host should handle it properly. The host must
know how to do it, though, so you need appropriate host-side drivers and/or their
parameters set properly.

AP

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