diff options
author | Benoit Goby <benoit@android.com> | 2011-04-19 20:37:33 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:38:41 -0800 |
commit | 63fc2625d029bb01844f3b6cd4510cb1fffcac27 (patch) | |
tree | 7a3748f7b3f7d0b0a770f46314512f60f4e4fdcf /include/linux/usb/composite.h | |
parent | d74a4a005ef4fd02a5fef4e7565fc7c09fad1136 (diff) |
usb: gadget: android: Update android gadget driver
* Functions and the device descriptor are configured from user space:
echo 0 > /sys/class/android_usb/android0/enable
echo adb,acm > /sys/class/android_usb/android0/functions
echo 2 > /sys/class/android_usb/android0/f_acm/instances
echo 1 > /sys/class/android_usb/android0/enable
* Driver does not require platform data anymore
* Moved function initialization to android.c instead of each
function file
* Replaced switches by uevents
Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Change-Id: If5ad9267c111ad0a442f0d87a0d31082dc5381b6
Diffstat (limited to 'include/linux/usb/composite.h')
-rw-r--r-- | include/linux/usb/composite.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index a0229f7e598e..6938a8608cf1 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -36,7 +36,6 @@ #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 @@ -47,7 +46,6 @@ */ #define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */ -struct usb_composite_dev; struct usb_configuration; /** @@ -120,9 +118,6 @@ struct usb_function { struct usb_configuration *config; - /* 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 * we can't restructure things to avoid mismatching. @@ -154,7 +149,6 @@ 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 *); @@ -164,9 +158,6 @@ 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); -void usb_composite_force_reset(struct usb_composite_dev *); - int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f, struct usb_ep *_ep); @@ -297,9 +288,6 @@ struct usb_composite_driver { enum usb_device_speed max_speed; unsigned needs_serial:1; - struct class *class; - atomic_t function_count; - int (*unbind)(struct usb_composite_dev *); void (*disconnect)(struct usb_composite_dev *); @@ -307,8 +295,6 @@ 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_probe(struct usb_composite_driver *driver, @@ -379,15 +365,6 @@ struct usb_composite_dev { /* protects deactivations and delayed_status counts*/ spinlock_t lock; - - /* switch indicating connected/disconnected state */ - struct switch_dev sw_connected; - /* switch indicating current configuration */ - struct switch_dev sw_config; - /* current connected state for sw_connected */ - bool connected; - - struct work_struct switch_work; }; extern int usb_string_id(struct usb_composite_dev *c); |