• M
    staging: usb: gadget: Add Configurable Composite Gadget driver · 332bb43f
    Mike Lockwood 提交于
    The Configurable Gadget driver is a composite driver that allows
    userspace to change at runtime the list of functions enabled in
    its configuration and to configure these functions. It supports
    multiple functions: acm, rndis, and mass storage.
    
    It is usually controlled by a daemon that changes the configuration
    based on user settings. For example, rndis is enabled when the user
    enables sharing the phone data connection.
    
    As an example on how to use it, the following shell commands will
    make the gadget disconnect from the host and make it be re-enumerated
    as a composite with 1 rndis and 2 acm interfaces, and a different
    product id:
    
    echo 0       > /sys/class/ccg_usb/ccg0/enable
    echo rndis,acm > /sys/class/ccg_usb/ccg0/functions
    echo 2       > /sys/class/ccg_usb/ccg0/f_acm/instances
    echo -n 0x2d01 > /sys/module/g_ccg/parameters/idProduct
    echo 1       > /sys/class/ccg_usb/ccg0/enable
    
    The driver requires a gadget controller that supports software
    control of the D+ pullup and the controller driver must support
    disabling the pullup during composite_bind.
    Signed-off-by: NMike Lockwood <lockwood@android.com>
    Signed-off-by: NBenoit Goby <benoit@android.com>
    	[import from android.c, implement review comments, remove adb,mtp,ptp,accessory]
    Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
    Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    332bb43f
Makefile 2.0 KB