summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-02-06 21:53:51 -0500
committerArve Hjønnevåg <arve@android.com>2010-02-12 19:42:24 -0800
commitf8cf7f90ac799df1f9a34bd7cd6fb0dce063c8c5 (patch)
tree8853e1387a6c1de054afc05673454da55f0670ce /include
parent1d69bc989dc640d17e966818936e30698f243790 (diff)
USB: composite: Add class driver for enabling and disabling USB functions.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/composite.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 8f33ae3e00f3..66884030c58a 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -128,6 +128,7 @@ struct usb_function {
/* private: */
/* internals */
struct list_head list;
+ struct device *dev;
};
int usb_add_function(struct usb_configuration *, struct usb_function *);
@@ -268,6 +269,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...
@@ -279,6 +283,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 *);