]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: composite: Add usb_remove_config
authorBenoit Goby <benoit@android.com>
Thu, 10 May 2012 08:07:57 +0000 (10:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 19:21:32 +0000 (12:21 -0700)
commit473a310216104cbd5f05169ed36893a8af161fae
tree08272c25d5e7dfb95df2261699f44ad4eb4da60e
parent5f459f4e061bb0f2256b53a36de591ef52c3a6d9
usb: gadget: composite: Add usb_remove_config

Add usb_remove_config to unbind a configuration and remove it from
the configs list. This allows implementing composite gadget drivers that
can disconnect themself from the bus and that will later be re-enumerated
with a different configuration.

Gadget drivers must call usb_gadget_disconnect before calling this
function to disable the pullup, disconnect the device from the host,
and prevent the host from enumerating the device while we are changing
the gadget configuration.

Signed-off-by: Benoit Goby <benoit@android.com>
[change return type of [usb_]remove_config]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h