On 11/22/2012 09:25 PM, Michal Nazarewicz wrote:
echo 1>  /cfg/usb-function-gadget/G1/ready

On Thu, Nov 22 2012, Sebastian Andrzej Siewior wrote:
One thing you miss: Lets say you have C1 and C2. How do you configure
the same F1 in C1 and C2 _and_ how do you configure a different F1 in
F1 and F2 in C2. I guess the latter will work just now but the former
example won't. The former example is used by the nokia gadget, the
latter by g_serial.

Yeah.  I would propose having a separate directory for functions, ie.:

        cd /cfg/usb-function-gadget/gadget1
        mkdir functions/mass_storage

would load the function and allocate usb_function structure for it (or
whatever) as well as create all the interesting attributes inside the
directory, and later on:

        mkdir configs/config0
        mkdir configs/config0/func0
        ln functions/mass_storage configs/config0/func0/function

or something similar.

Cute from the interface point of view. So we need one struct
usb_function for each gadget and something which holds the private of
the function pointing to the disk_data/netdev/uart_port/…

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to