diff options
author | Benoit Goby <benoit@android.com> | 2012-05-10 08:07:57 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-10 19:21:32 (GMT) |
commit | 51cce6fc155c4d7eea2ff975ee7c82b89332c6d9 (patch) | |
tree | 08272c25d5e7dfb95df2261699f44ad4eb4da60e /include/linux/usb | |
parent | 56d95f3174450d22a3b8d936bea2cb414262ce8f (diff) | |
download | linux-fsl-qoriq-51cce6fc155c4d7eea2ff975ee7c82b89332c6d9.tar.xz |
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')
-rw-r--r-- | include/linux/usb/composite.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index a316fba..5d27a1f 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. |