summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-09-19 02:51:20 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-09-19 02:51:20 -0700
commit4f3a1d592e8dc6d7327fc7ca915b9b764883d5b7 (patch)
treeb6ef05cf65c34bd38519aa84b7b86a16c1557eb4 /include/linux
parent157e3d7042ddcc0aa7f32fb8a8b1dd2aeb1f562d (diff)
parent303d082c15dc71fd34e81b21d7b65216c8915a85 (diff)
Merge kroah.com:/home/linux/BK/bleed-2.5
into kroah.com:/home/linux/BK/gregkh-2.6
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb_gadget.h30
2 files changed, 16 insertions, 16 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a20b33d953aa..5575ebfb276d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -80,7 +80,6 @@ struct usb_host_interface {
* @act_altsetting: index of current altsetting. this number is always
* less than num_altsetting. after the device is configured, each
* interface uses its default setting of zero.
- * @max_altsetting: the max number of altsettings for this interface.
* @driver: the USB driver that is bound to this interface.
* @minor: the minor number assigned to this interface, if this
* interface is bound to a driver that uses the USB major number.
@@ -118,7 +117,6 @@ struct usb_interface {
unsigned act_altsetting; /* active alternate setting */
unsigned num_altsetting; /* number of alternate settings */
- unsigned max_altsetting; /* total memory allocated */
struct usb_driver *driver; /* driver */
int minor; /* minor number this interface is bound to */
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h
index c98a95dbe250..da2d9749baf6 100644
--- a/include/linux/usb_gadget.h
+++ b/include/linux/usb_gadget.h
@@ -72,9 +72,9 @@ struct usb_request {
unsigned length;
dma_addr_t dma;
- unsigned no_interrupt : 1,
- zero : 1,
- short_not_ok : 1;
+ unsigned no_interrupt:1;
+ unsigned zero:1;
+ unsigned short_not_ok:1;
void (*complete)(struct usb_ep *ep,
struct usb_request *req);
@@ -122,9 +122,11 @@ struct usb_ep_ops {
/**
* struct usb_ep - device side representation of USB endpoint
* @name:identifier for the endpoint, such as "ep-a" or "ep9in-bulk"
+ * @ops: Function pointers used to access hardware-specific operations.
* @ep_list:the gadget's ep_list holds all of its endpoints
- * @maxpacket:the maximum packet size used on this endpoint, as
- * configured when the endpoint was enabled.
+ * @maxpacket:The maximum packet size used on this endpoint. The initial
+ * value can sometimes be reduced (hardware allowing), according to
+ * the endpoint descriptor used to configure the endpoint.
* @driver_data:for use by the gadget driver. all other fields are
* read-only to gadget drivers.
*
@@ -138,7 +140,7 @@ struct usb_ep {
const char *name;
const struct usb_ep_ops *ops;
struct list_head ep_list;
- unsigned maxpacket : 16;
+ unsigned maxpacket:16;
};
/*-------------------------------------------------------------------------*/
@@ -443,18 +445,21 @@ struct usb_gadget_ops {
/**
* struct usb_gadget - represents a usb slave device
+ * @ops: Function pointers used to access hardware-specific operations.
* @ep0: Endpoint zero, used when reading or writing responses to
* driver setup() requests
* @ep_list: List of other endpoints supported by the device.
* @speed: Speed of current connection to USB host.
* @name: Identifies the controller hardware type. Used in diagnostics
* and sometimes configuration.
+ * @dev: Driver model state for this abstract device.
*
* Gadgets have a mostly-portable "gadget driver" implementing device
- * functions, handling all usb configurations and interfaces. They
- * also have a hardware-specific driver (accessed through ops vectors),
- * which insulates the gadget driver from hardware details and packages
- * the hardware endpoints through generic i/o queues.
+ * functions, handling all usb configurations and interfaces. Gadget
+ * drivers talk to hardware-specific code indirectly, through ops vectors.
+ * That insulates the gadget driver from hardware details, and packages
+ * the hardware endpoints through generic i/o queues. The "usb_gadget"
+ * and "usb_ep" interfaces provide that insulation from the hardware.
*
* Except for the driver data, all fields in this structure are
* read-only to the gadget driver. That driver data is part of the
@@ -469,10 +474,6 @@ struct usb_gadget {
struct list_head ep_list; /* of usb_ep */
enum usb_device_speed speed;
const char *name;
-
- /* use this to allocate dma-coherent buffers or set up
- * dma mappings. or print diagnostics, etc.
- */
struct device dev;
};
@@ -576,6 +577,7 @@ usb_gadget_clear_selfpowered (struct usb_gadget *gadget)
* Called in a context that permits sleeping.
* @suspend: Invoked on USB suspend. May be called in_interrupt.
* @resume: Invoked on USB resume. May be called in_interrupt.
+ * @driver: Driver model state for this driver.
*
* Devices are disabled till a gadget driver successfully bind()s, which
* means the driver will handle setup() requests needed to enumerate (and