summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2011-05-25 23:59:43 -0700
committerPraneeth Bajjuri <praneeth@ti.com>2011-09-20 13:44:11 -0700
commit402060fb1939e2434e38c436ad6e3adeb5cc563a (patch)
treee9b00ef3829ca7e429fdc942efdedb23f9658ac1 /include/linux
parent4754423c3227cd74f3d642339217777a263a4bcd (diff)
usb: gadget: composite: Add usb_remove_config
This allows composite drivers to dynamically change their configuration. For example, a driver might remove a configuration and register a new one with a different set of functions. User should prevent the host from enumerating the device while changing the configuration: usb_gadget_disconnect(cdev->gadget); usb_remove_config(cdev, old_config); usb_add_config(cdev, new_config, new_conf_bind); usb_gadget_connect(cdev->gadget); Change-Id: Icbfb4ce41685fde9bf63d5d58fca1ad242aa69f9 Signed-off-by: Benoit Goby <benoit@android.com>
Diffstat (limited to 'include/linux')
-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 10b0a122aa7..cb65fa2c016 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -249,6 +249,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.