linux-xiaomi-chiron/include/uapi/linux/usb
Felipe Balbi 541b6fe630 usb: add helper to extract bits 12:11 of wMaxPacketSize
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>
2016-10-31 11:15:33 +02: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 cdc: add header guards 2015-09-15 21:53:24 -07:00
ch9.h usb: add helper to extract bits 12:11 of wMaxPacketSize 2016-10-31 11:15:33 +02:00
ch11.h usb: Support USB 3.1 extended port status request 2016-01-24 20:16:52 -08:00
functionfs.h usb: gadget: f_fs: handle control requests in config 0 2016-08-25 12:13:17 +03: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 Add ioctls to enable and disable local controls on an instrument 2016-02-03 13:54:06 -08:00
video.h [media] uvcvideo: Enable UVC 1.5 device detection 2015-11-19 11:13:19 -02:00