aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-21 14:33:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-21 14:33:41 -0400
commit61fe2d75f138992f116ee70e83f10ff2d7e79143 (patch)
treec08ba135803a93852583a2916cd96981f53cfd06 /include/uapi/linux/usb
parent499b3803d3e2f062f73bf22372b38393369ffcbf (diff)
parent8346b33fad01cfe93f0fd0e64cd32ff40bd4ba41 (diff)
Merge tag 'usb-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v3.17 merge window Surprisingly enough, while a big set of patches, the majority is composed of cleanups (using devm_*, fixing sparse errors, moving code around, adding const, etc). The highlights are addition of new support for PLX USB338x devices, and support for USB 2.0-only configurations of the DWC3 IP core. Signed-of-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/uapi/linux/usb')
-rw-r--r--include/uapi/linux/usb/functionfs.h82
1 files changed, 80 insertions, 2 deletions
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 24b68c59dcf8..0154b2859fd7 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -18,10 +18,9 @@ enum functionfs_flags {
18 FUNCTIONFS_HAS_FS_DESC = 1, 18 FUNCTIONFS_HAS_FS_DESC = 1,
19 FUNCTIONFS_HAS_HS_DESC = 2, 19 FUNCTIONFS_HAS_HS_DESC = 2,
20 FUNCTIONFS_HAS_SS_DESC = 4, 20 FUNCTIONFS_HAS_SS_DESC = 4,
21 FUNCTIONFS_HAS_MS_OS_DESC = 8,
21}; 22};
22 23
23#ifndef __KERNEL__
24
25/* Descriptor of an non-audio endpoint */ 24/* Descriptor of an non-audio endpoint */
26struct usb_endpoint_descriptor_no_audio { 25struct usb_endpoint_descriptor_no_audio {
27 __u8 bLength; 26 __u8 bLength;
@@ -41,6 +40,37 @@ struct usb_functionfs_descs_head {
41 __le32 hs_count; 40 __le32 hs_count;
42} __attribute__((packed, deprecated)); 41} __attribute__((packed, deprecated));
43 42
43/* MS OS Descriptor header */
44struct usb_os_desc_header {
45 __u8 interface;
46 __le32 dwLength;
47 __le16 bcdVersion;
48 __le16 wIndex;
49 union {
50 struct {
51 __u8 bCount;
52 __u8 Reserved;
53 };
54 __le16 wCount;
55 };
56} __attribute__((packed));
57
58struct usb_ext_compat_desc {
59 __u8 bFirstInterfaceNumber;
60 __u8 Reserved1;
61 __u8 CompatibleID[8];
62 __u8 SubCompatibleID[8];
63 __u8 Reserved2[6];
64};
65
66struct usb_ext_prop_desc {
67 __le32 dwSize;
68 __le32 dwPropertyDataType;
69 __le16 wPropertyNameLength;
70} __attribute__((packed));
71
72#ifndef __KERNEL__
73
44/* 74/*
45 * Descriptors format: 75 * Descriptors format:
46 * 76 *
@@ -52,9 +82,11 @@ struct usb_functionfs_descs_head {
52 * | | fs_count | LE32 | number of full-speed descriptors | 82 * | | fs_count | LE32 | number of full-speed descriptors |
53 * | | hs_count | LE32 | number of high-speed descriptors | 83 * | | hs_count | LE32 | number of high-speed descriptors |
54 * | | ss_count | LE32 | number of super-speed descriptors | 84 * | | ss_count | LE32 | number of super-speed descriptors |
85 * | | os_count | LE32 | number of MS OS descriptors |
55 * | | fs_descrs | Descriptor[] | list of full-speed descriptors | 86 * | | fs_descrs | Descriptor[] | list of full-speed descriptors |
56 * | | hs_descrs | Descriptor[] | list of high-speed descriptors | 87 * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
57 * | | ss_descrs | Descriptor[] | list of super-speed descriptors | 88 * | | ss_descrs | Descriptor[] | list of super-speed descriptors |
89 * | | os_descrs | OSDesc[] | list of MS OS descriptors |
58 * 90 *
59 * Depending on which flags are set, various fields may be missing in the 91 * Depending on which flags are set, various fields may be missing in the
60 * structure. Any flags that are not recognised cause the whole block to be 92 * structure. Any flags that are not recognised cause the whole block to be
@@ -81,6 +113,52 @@ struct usb_functionfs_descs_head {
81 * | 0 | bLength | U8 | length of the descriptor | 113 * | 0 | bLength | U8 | length of the descriptor |
82 * | 1 | bDescriptorType | U8 | descriptor type | 114 * | 1 | bDescriptorType | U8 | descriptor type |
83 * | 2 | payload | | descriptor's payload | 115 * | 2 | payload | | descriptor's payload |
116 *
117 * OSDesc[] is an array of valid MS OS Feature Descriptors which have one of
118 * the following formats:
119 *
120 * | off | name | type | description |
121 * |-----+-----------------+------+--------------------------|
122 * | 0 | inteface | U8 | related interface number |
123 * | 1 | dwLength | U32 | length of the descriptor |
124 * | 5 | bcdVersion | U16 | currently supported: 1 |
125 * | 7 | wIndex | U16 | currently supported: 4 |
126 * | 9 | bCount | U8 | number of ext. compat. |
127 * | 10 | Reserved | U8 | 0 |
128 * | 11 | ExtCompat[] | | list of ext. compat. d. |
129 *
130 * | off | name | type | description |
131 * |-----+-----------------+------+--------------------------|
132 * | 0 | inteface | U8 | related interface number |
133 * | 1 | dwLength | U32 | length of the descriptor |
134 * | 5 | bcdVersion | U16 | currently supported: 1 |
135 * | 7 | wIndex | U16 | currently supported: 5 |
136 * | 9 | wCount | U16 | number of ext. compat. |
137 * | 11 | ExtProp[] | | list of ext. prop. d. |
138 *
139 * ExtCompat[] is an array of valid Extended Compatiblity descriptors
140 * which have the following format:
141 *
142 * | off | name | type | description |
143 * |-----+-----------------------+------+-------------------------------------|
144 * | 0 | bFirstInterfaceNumber | U8 | index of the interface or of the 1st|
145 * | | | | interface in an IAD group |
146 * | 1 | Reserved | U8 | 0 |
147 * | 2 | CompatibleID | U8[8]| compatible ID string |
148 * | 10 | SubCompatibleID | U8[8]| subcompatible ID string |
149 * | 18 | Reserved | U8[6]| 0 |
150 *
151 * ExtProp[] is an array of valid Extended Properties descriptors
152 * which have the following format:
153 *
154 * | off | name | type | description |
155 * |-----+-----------------------+------+-------------------------------------|
156 * | 0 | dwSize | U32 | length of the descriptor |
157 * | 4 | dwPropertyDataType | U32 | 1..7 |
158 * | 8 | wPropertyNameLength | U16 | bPropertyName length (NL) |
159 * | 10 | bPropertyName |U8[NL]| name of this property |
160 * |10+NL| dwPropertyDataLength | U32 | bPropertyData length (DL) |
161 * |14+NL| bProperty |U8[DL]| payload of this property |
84 */ 162 */
85 163
86struct usb_functionfs_strings_head { 164struct usb_functionfs_strings_head {