From f8cf7f90ac799df1f9a34bd7cd6fb0dce063c8c5 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Sat, 6 Feb 2010 21:53:51 -0500 Subject: USB: composite: Add class driver for enabling and disabling USB functions. Signed-off-by: Mike Lockwood --- include/linux/usb/composite.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux') 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 *); -- cgit v1.2.3