blob: 359529c07956c0936be4812946c77efa1e185678 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__LINUX_FUNCTIONFS_H__
20#define _UAPI__LINUX_FUNCTIONFS_H__
21#include <linux/types.h>
22#include <linux/ioctl.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/usb/ch9.h>
25enum {
26 FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070027 FUNCTIONFS_STRINGS_MAGIC = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070029 FUNCTIONFS_DESCRIPTORS_MAGIC_V2 = 3,
30};
31enum functionfs_flags {
32 FUNCTIONFS_HAS_FS_DESC = 1,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 FUNCTIONFS_HAS_HS_DESC = 2,
35 FUNCTIONFS_HAS_SS_DESC = 4,
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37struct usb_endpoint_descriptor_no_audio {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039 __u8 bLength;
40 __u8 bDescriptorType;
Ben Cheng655a7c02013-10-16 16:09:24 -070041 __u8 bEndpointAddress;
42 __u8 bmAttributes;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044 __le16 wMaxPacketSize;
45 __u8 bInterval;
Ben Cheng655a7c02013-10-16 16:09:24 -070046} __attribute__((packed));
47struct usb_functionfs_descs_head {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049 __le32 magic;
50 __le32 length;
Ben Cheng655a7c02013-10-16 16:09:24 -070051 __le32 fs_count;
52 __le32 hs_count;
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070054} __attribute__((packed, deprecated));
55struct usb_functionfs_strings_head {
Ben Cheng655a7c02013-10-16 16:09:24 -070056 __le32 magic;
57 __le32 length;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070059 __le32 str_count;
60 __le32 lang_count;
Ben Cheng655a7c02013-10-16 16:09:24 -070061} __attribute__((packed));
62enum usb_functionfs_event_type {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070064 FUNCTIONFS_BIND,
65 FUNCTIONFS_UNBIND,
Ben Cheng655a7c02013-10-16 16:09:24 -070066 FUNCTIONFS_ENABLE,
67 FUNCTIONFS_DISABLE,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070069 FUNCTIONFS_SETUP,
70 FUNCTIONFS_SUSPEND,
Ben Cheng655a7c02013-10-16 16:09:24 -070071 FUNCTIONFS_RESUME
72};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070074struct usb_functionfs_event {
75 union {
Ben Cheng655a7c02013-10-16 16:09:24 -070076 struct usb_ctrlrequest setup;
77 } __attribute__((packed)) u;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079 __u8 type;
80 __u8 _pad[3];
Ben Cheng655a7c02013-10-16 16:09:24 -070081} __attribute__((packed));
82#define FUNCTIONFS_FIFO_STATUS _IO('g', 1)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define FUNCTIONFS_FIFO_FLUSH _IO('g', 2)
85#define FUNCTIONFS_CLEAR_HALT _IO('g', 3)
Ben Cheng655a7c02013-10-16 16:09:24 -070086#define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
87#define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#endif