diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/usb/composite.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index a521e8c0e55..0b2d2919edb 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -36,6 +36,7 @@ #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> +#include <linux/switch.h> /* * USB function drivers should return USB_GADGET_DELAYED_STATUS if they @@ -108,7 +109,9 @@ struct usb_function { struct usb_descriptor_header **hs_descriptors; struct usb_configuration *config; - int hidden; + + /* disabled is zero if the function is enabled */ + int disabled; /* REVISIT: bind() functions can be marked __init, which * makes trouble for section mismatch analysis. See if @@ -147,6 +150,8 @@ int usb_function_activate(struct usb_function *); int usb_interface_id(struct usb_configuration *, struct usb_function *); +void usb_function_set_enabled(struct usb_function *, int); + /** * ep_choose - select descriptor endpoint at current device speed * @g: gadget, connected and running at some speed @@ -365,6 +370,8 @@ struct usb_composite_dev { /* protects deactivations and delayed_status counts*/ spinlock_t lock; + + struct switch_dev sdev; }; extern int usb_string_id(struct usb_composite_dev *c); |
