summaryrefslogtreecommitdiff
path: root/include/linux/usb/composite.h
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2011-05-25 23:59:43 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:38:41 -0800
commitd74a4a005ef4fd02a5fef4e7565fc7c09fad1136 (patch)
tree3c3f6b3a724a0e380a9e62d317aca32cac1d5937 /include/linux/usb/composite.h
parentb474bbbd4844d36dbc41775a559cde3375f0eefe (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/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 86004e313bd1..a0229f7e598e 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -251,6 +251,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.