diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-03-15 18:14:07 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-03-15 18:14:07 -0800 |
| commit | dd471fb21291f0f302d2a8524b4bed7f36bdbdca (patch) | |
| tree | c639163e4c22a581cf58727423ea1320ab978c66 /include/linux/usb_gadget.h | |
| parent | 1b2ed5b74904b6d1540efdd0bd08022765dc292a (diff) | |
| parent | 731ea3e983eff5a364bc2c81bc91d3c4eb6d8f51 (diff) | |
Merge kroah.com:/home/linux/BK/bleed-2.6
into kroah.com:/home/linux/BK/usb-2.6
Diffstat (limited to 'include/linux/usb_gadget.h')
| -rw-r--r-- | include/linux/usb_gadget.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index 9bb39b8b16aa..503abfe9a9aa 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h @@ -465,6 +465,8 @@ struct usb_gadget_ops { * driver setup() requests * @ep_list: List of other endpoints supported by the device. * @speed: Speed of current connection to USB host. + * @is_dualspeed: True if the controller supports both high and full speed + * operation. If it does, the gadget driver must also support both. * @name: Identifies the controller hardware type. Used in diagnostics * and sometimes configuration. * @dev: Driver model state for this abstract device. @@ -488,6 +490,7 @@ struct usb_gadget { struct usb_ep *ep0; struct list_head ep_list; /* of usb_ep */ enum usb_device_speed speed; + unsigned is_dualspeed:1; const char *name; struct device dev; }; @@ -690,7 +693,7 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver); /** * struct usb_string - wraps a C string and its USB id * @id:the (nonzero) ID for this string - * @s:the string, in ISO-8859/1 characters + * @s:the string, in UTF-8 encoding * * If you're using usb_gadget_get_string(), use this to wrap a string * together with its ID. @@ -716,6 +719,17 @@ struct usb_gadget_strings { /* put descriptor for string with that id into buf (buflen >= 256) */ int usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8 *buf); +/*-------------------------------------------------------------------------*/ + +/* utility to simplify managing config descriptors */ + +/* write vector of descriptors into buffer */ +int usb_descriptor_fillbuf(void *, unsigned, + const struct usb_descriptor_header **); + +/* build config descriptor from single descriptor vector */ +int usb_gadget_config_buf(const struct usb_config_descriptor *config, + void *buf, unsigned buflen, const struct usb_descriptor_header **desc); #endif /* __KERNEL__ */ |
