diff options
author | Mike Lockwood <lockwood@android.com> | 2010-02-06 21:53:51 -0500 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-09-29 17:49:27 -0700 |
commit | 2db5cd82710754f3b3f3443697563068f5869c7d (patch) | |
tree | 5c4885988aed6afdc2de2cc8801ff0ddd6433323 /include/linux | |
parent | ef148753e8bf5a8f571698ed53b34d90828e9da7 (diff) |
USB: composite: Add class driver for enabling and disabling USB functions.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb/composite.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 9af8c466d83b..984657486992 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -129,6 +129,7 @@ struct usb_function { /* internals */ struct list_head list; DECLARE_BITMAP(endpoints, 32); + struct device *dev; }; int usb_add_function(struct usb_configuration *, struct usb_function *); @@ -270,6 +271,9 @@ struct usb_composite_driver { const struct usb_device_descriptor *dev; struct usb_gadget_strings **strings; + struct class *class; + atomic_t function_count; + /* REVISIT: bind() functions can be marked __init, which * makes trouble for section mismatch analysis. See if * we can't restructure things to avoid mismatching... @@ -283,6 +287,8 @@ struct usb_composite_driver { /* global suspend hooks */ void (*suspend)(struct usb_composite_dev *); void (*resume)(struct usb_composite_dev *); + + void (*enable_function)(struct usb_function *f, int enable); }; extern int usb_composite_register(struct usb_composite_driver *); |