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;
};
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.
This documentation was generated with kernel version 2.6.1.