summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/composite.h
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-05-10 10:07:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 12:21:32 -0700
commit51cce6fc155c4d7eea2ff975ee7c82b89332c6d9 (patch)
tree08272c25d5e7dfb95df2261699f44ad4eb4da60e /include/linux/usb/composite.h
parent56d95f3174450d22a3b8d936bea2cb414262ce8f (diff)
downloadlinux-51cce6fc155c4d7eea2ff975ee7c82b89332c6d9.tar.gz
linux-51cce6fc155c4d7eea2ff975ee7c82b89332c6d9.tar.bz2
linux-51cce6fc155c4d7eea2ff975ee7c82b89332c6d9.zip
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>
Diffstat (limited to 'include/linux/usb/composite.h')
-rw-r--r--include/linux/usb/composite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index a316fba73518..5d27a1fe5ce9 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -242,6 +242,9 @@ int usb_add_config(struct usb_composite_dev *,
struct usb_configuration *,
int (*)(struct usb_configuration *));
+void usb_remove_config(struct usb_composite_dev *,
+ struct usb_configuration *);
+
/**
* struct usb_composite_driver - groups configurations into a gadget
* @name: For diagnostics, identifies the driver.