summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2011-12-13 16:16:31 -0800
committerColin Cross <ccross@android.com>2012-04-09 13:57:59 -0700
commit894eecb7c7cdbd01c887c673a7673808e5344ce7 (patch)
tree6e6c80d2823f8b5d74171616eec8d322dcedd106 /include
parentea93b9c66074e3eeb2c2797060275fd267541758 (diff)
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>
Diffstat (limited to 'include')
-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 a316fba7351..6938a8608cf 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 *));
+int 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.