Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_gadget_config_buf(9) [centos man page]

USB_GADGET_CONFIG_BU(9) 				      Kernel Mode Gadget API					   USB_GADGET_CONFIG_BU(9)

NAME
usb_gadget_config_buf - builts a complete configuration descriptor SYNOPSIS
int usb_gadget_config_buf(const struct usb_config_descriptor * config, void * buf, unsigned length, const struct usb_descriptor_header ** desc); ARGUMENTS
config Header for the descriptor, including characteristics such as power requirements and number of interfaces. buf Buffer for the resulting configuration descriptor. length Length of buffer. If this is not big enough to hold the entire configuration descriptor, an error code will be returned. desc Null-terminated vector of pointers to the descriptors (interface, endpoint, etc) defining all functions in this device configuration. DESCRIPTION
This copies descriptors into the response buffer, building a descriptor for that configuration. It returns the buffer length or a negative status code. The config.wTotalLength field is set to match the length of the result, but other descriptor fields (including power usage and interface count) must be set by the caller. Gadget drivers could use this when constructing a config descriptor in response to USB_REQ_GET_DESCRIPTOR. They will need to patch the resulting bDescriptorType value if USB_DT_OTHER_SPEED_CONFIG is needed. AUTHOR
David Brownell <dbrownell@users.sourceforge.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_GADGET_CONFIG_BU(9)

Check Out this Related Man Page

STRUCT 
USB_EP(9) Kernel Mode Gadget API STRUCT USB_EP(9) NAME
struct_usb_ep - device side representation of USB endpoint SYNOPSIS
struct usb_ep { void * driver_data; const char * name; const struct usb_ep_ops * ops; struct list_head ep_list; unsigned maxpacket:16; unsigned max_streams:16; unsigned mult:2; unsigned maxburst:5; u8 address; const struct usb_endpoint_descriptor * desc; const struct usb_ss_ep_comp_descriptor * comp_desc; }; MEMBERS
driver_data for use by the gadget driver. 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. The initial value can sometimes be reduced (hardware allowing), according to the endpoint descriptor used to configure the endpoint. max_streams The maximum number of streams supported by this EP (0 - 16, actual number is 2^n) mult multiplier, 'mult' value for SS Isoc EPs maxburst the maximum number of bursts supported by this EP (for usb3) address used to identify the endpoint when finding descriptor that matches connection speed desc endpoint descriptor. This pointer is set before the endpoint is enabled and remains valid until the endpoint is disabled. comp_desc In case of SuperSpeed support, this is the endpoint companion descriptor that is used to configure the endpoint DESCRIPTION
the bus controller driver lists all the general purpose endpoints in gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, and is accessed only in response to a driver setup callback. AUTHOR
David Brownell <dbrownell@users.sourceforge.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT USB_EP(9)
Man Page