1USB_SET_INTERFACE(9)             USB Core APIs            USB_SET_INTERFACE(9)
2
3
4

NAME

6       usb_set_interface - Makes a particular alternate setting be current
7

SYNOPSIS

9       int usb_set_interface(struct usb_device * dev, int interface,
10                             int alternate);
11

ARGUMENTS

13       dev
14           the device whose interface is being updated
15
16       interface
17           the interface being updated
18
19       alternate
20           the setting being chosen.
21

CONTEXT

23       !in_interrupt ()
24

DESCRIPTION

26       This is used to enable data transfers on interfaces that may not be
27       enabled by default. Not all devices support such configurability. Only
28       the driver bound to an interface may change its setting.
29
30       Within any given configuration, each interface may have several
31       alternative settings. These are often used to control levels of
32       bandwidth consumption. For example, the default setting for a high
33       speed interrupt endpoint may not send more than 64 bytes per
34       microframe, while interrupt transfers of up to 3KBytes per microframe
35       are legal. Also, isochronous endpoints may never be part of an
36       interface's default setting. To access such bandwidth, alternate
37       interface settings must be made current.
38
39       Note that in the Linux USB subsystem, bandwidth associated with an
40       endpoint in a given alternate setting is not reserved until an URB is
41       submitted that needs that bandwidth. Some other operating systems
42       allocate bandwidth early, when a configuration is chosen.
43
44       This call is synchronous, and may not be used in an interrupt context.
45       Also, drivers must not change altsettings while urbs are scheduled for
46       endpoints in that interface; all such urbs must first be completed
47       (perhaps forced by unlinking).
48
49       Returns zero on success, or else the status code returned by the
50       underlying usb_control_msg call.
51
53Kernel Hackers Manual 2.6.       November 2011            USB_SET_INTERFACE(9)
Impressum