1USB_INTERFACE_ID(9)         Kernel Mode Gadget API         USB_INTERFACE_ID(9)
2
3
4

NAME

6       usb_interface_id - allocate an unused interface ID
7

SYNOPSIS

9       int usb_interface_id(struct usb_configuration * config,
10                            struct usb_function * function);
11

ARGUMENTS

13       config
14           configuration associated with the interface
15
16       function
17           function handling the interface
18

CONTEXT

20       single threaded during gadget setup
21

DESCRIPTION

23       usb_interface_id is called from usb_function.bind callbacks to allocate
24       new interface IDs. The function driver will then store that ID in
25       interface, association, CDC union, and other descriptors. It will also
26       handle any control requests targetted at that interface, particularly
27       changing its altsetting via set_alt. There may also be class-specific
28       or vendor-specific requests to handle.
29
30       All interface identifier should be allocated using this routine, to
31       ensure that for example different functions don't wrongly assign
32       different meanings to the same identifier. Note that since interface
33       identifers are configuration-specific, functions used in more than one
34       configuration (or more than once in a given configuration) need
35       multiple versions of the relevant descriptors.
36
37       Returns the interface ID which was allocated; or -ENODEV if no more
38       interface IDs can be allocated.
39

AUTHOR

41       David Brownell <dbrownell@users.sourceforge.net>
42           Author.
43
45Kernel Hackers Manual 2.6.       November 2011             USB_INTERFACE_ID(9)
Impressum