USB_GADGET

Section: (9)
Updated: 13 April 2004
Index Return to Main Contents

 

NAME

struct usb_gadget - represents a usb slave device  

SYNOPSIS

struct usb_gadget {
  const struct usb_gadget_ops * ops;
  struct usb_ep   * ep0;
  struct list_head  ep_list;
  enum usb_device_speed  speed;
  const char   * name;
  struct device   dev;
};  
 

MEMBERS

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.
 

DESCRIPTION

Gadgets have a mostly-portable ``gadget driver'' implementing device 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 ``driver model'' infrastructure in 2.5 (and later) kernels, and for earlier systems is grouped in a similar structure that's not known to the rest of the kernel.  

ABOUT THIS DOCUMENT

This documentation was generated with kernel version 2.6.1.


 

Index

NAME
SYNOPSIS
MEMBERS
DESCRIPTION
ABOUT THIS DOCUMENT

This document was created by man2html, using the manual pages.
Time: 11:22:04 GMT, April 13, 2004