linux/include/uapi/linux/usb
Felipe Balbi 3b5a43dad0 usb: add helper to extract bits 12:11 of wMaxPacketSize
commit 541b6fe630 upstream.

According to USB Specification 2.0 table 9-4,
wMaxPacketSize is a bitfield. Endpoint's maxpacket
is laid out in bits 10:0. For high-speed,
high-bandwidth isochronous endpoints, bits 12:11
contain a multiplier to tell us how many
transactions we want to try per uframe.

This means that if we want an isochronous endpoint
to issue 3 transfers of 1024 bytes per uframe,
wMaxPacketSize should contain the value:

	1024 | (2 << 11)

or 5120 (0x1400). In order to make Host and
Peripheral controller drivers' life easier, we're
adding a helper which returns bits 12:11. Note that
no care is made WRT to checking endpoint type and
gadget's speed. That's left for drivers to handle.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-03-16 02:26:17 +00:00
..
audio.h ALSA: usb: Fix Processing Unit Descriptor parsers 2013-02-21 13:55:12 +01:00
cdc-wdm.h USB: cdc-wdm: properly include types.h 2014-05-27 16:32:10 -07:00
cdc.h USB: cdc: add MBIM extended functional descriptor structure 2014-03-20 16:57:34 -04:00
ch9.h usb: add helper to extract bits 12:11 of wMaxPacketSize 2017-03-16 02:26:17 +00:00
ch11.h USB: move the definition of USB_MAXCHILDREN 2013-07-16 15:33:02 -07:00
functionfs.h usb: gadget: f_fs: resurect usb_functionfs_descs_head structure 2014-06-27 10:41:29 -05:00
g_printer.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
gadgetfs.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
Kbuild usb: cdc-wdm: export cdc-wdm uapi header 2014-05-27 16:29:39 -07:00
midi.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
tmc.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
video.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00