diff options
Diffstat (limited to 'include/uapi/linux/usb/functionfs.h')
| -rw-r--r-- | include/uapi/linux/usb/functionfs.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index 0154b2859fd7..295ba299e7bd 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h | |||
| @@ -19,6 +19,7 @@ enum functionfs_flags { | |||
| 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 | FUNCTIONFS_HAS_MS_OS_DESC = 8, |
| 22 | FUNCTIONFS_VIRTUAL_ADDR = 16, | ||
| 22 | }; | 23 | }; |
| 23 | 24 | ||
| 24 | /* Descriptor of an non-audio endpoint */ | 25 | /* Descriptor of an non-audio endpoint */ |
| @@ -32,6 +33,16 @@ struct usb_endpoint_descriptor_no_audio { | |||
| 32 | __u8 bInterval; | 33 | __u8 bInterval; |
| 33 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
| 34 | 35 | ||
| 36 | struct usb_functionfs_descs_head_v2 { | ||
| 37 | __le32 magic; | ||
| 38 | __le32 length; | ||
| 39 | __le32 flags; | ||
| 40 | /* | ||
| 41 | * __le32 fs_count, hs_count, fs_count; must be included manually in | ||
| 42 | * the structure taking flags into consideration. | ||
| 43 | */ | ||
| 44 | } __attribute__((packed)); | ||
| 45 | |||
| 35 | /* Legacy format, deprecated as of 3.14. */ | 46 | /* Legacy format, deprecated as of 3.14. */ |
| 36 | struct usb_functionfs_descs_head { | 47 | struct usb_functionfs_descs_head { |
| 37 | __le32 magic; | 48 | __le32 magic; |
| @@ -92,7 +103,7 @@ struct usb_ext_prop_desc { | |||
| 92 | * structure. Any flags that are not recognised cause the whole block to be | 103 | * structure. Any flags that are not recognised cause the whole block to be |
| 93 | * rejected with -ENOSYS. | 104 | * rejected with -ENOSYS. |
| 94 | * | 105 | * |
| 95 | * Legacy descriptors format: | 106 | * Legacy descriptors format (deprecated as of 3.14): |
| 96 | * | 107 | * |
| 97 | * | off | name | type | description | | 108 | * | off | name | type | description | |
| 98 | * |-----+-----------+--------------+--------------------------------------| | 109 | * |-----+-----------+--------------+--------------------------------------| |
| @@ -265,6 +276,12 @@ struct usb_functionfs_event { | |||
| 265 | */ | 276 | */ |
| 266 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) | 277 | #define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129) |
| 267 | 278 | ||
| 279 | /* | ||
| 280 | * Returns endpoint descriptor. If function is not active returns -ENODEV. | ||
| 281 | */ | ||
| 282 | #define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \ | ||
| 283 | struct usb_endpoint_descriptor) | ||
| 284 | |||
| 268 | 285 | ||
| 269 | 286 | ||
| 270 | #endif /* _UAPI__LINUX_FUNCTIONFS_H__ */ | 287 | #endif /* _UAPI__LINUX_FUNCTIONFS_H__ */ |
