blob: e012a8db78ef2cc13df980265622cf24a04f707e [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 __UHID_H_
20#define __UHID_H_
21#include <linux/input.h>
22#include <linux/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070024#include <linux/hid.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070025enum uhid_event_type {
Tao Baod7db5942015-01-28 10:07:51 -080026 __UHID_LEGACY_CREATE,
27 UHID_DESTROY,
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 UHID_START,
30 UHID_STOP,
31 UHID_OPEN,
32 UHID_CLOSE,
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 UHID_OUTPUT,
35 __UHID_LEGACY_OUTPUT_EV,
36 __UHID_LEGACY_INPUT,
37 UHID_GET_REPORT,
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 UHID_GET_REPORT_REPLY,
40 UHID_CREATE2,
41 UHID_INPUT2,
42 UHID_SET_REPORT,
Christopher Ferris82d75042015-01-26 10:57:07 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 UHID_SET_REPORT_REPLY,
Ben Cheng655a7c02013-10-16 16:09:24 -070045};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070046struct uhid_create2_req {
Tao Baod7db5942015-01-28 10:07:51 -080047 __u8 name[128];
Christopher Ferris82d75042015-01-26 10:57:07 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 __u8 phys[64];
50 __u8 uniq[64];
51 __u16 rd_size;
52 __u16 bus;
Christopher Ferris82d75042015-01-26 10:57:07 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 vendor;
55 __u32 product;
56 __u32 version;
57 __u32 country;
Christopher Ferris82d75042015-01-26 10:57:07 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE];
Christopher Ferris82d75042015-01-26 10:57:07 -080060} __attribute__((__packed__));
61enum uhid_dev_flag {
Tao Baod7db5942015-01-28 10:07:51 -080062 UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0),
Christopher Ferris82d75042015-01-26 10:57:07 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1),
65 UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2),
Christopher Ferris82d75042015-01-26 10:57:07 -080066};
67struct uhid_start_req {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 __u64 dev_flags;
Christopher Ferris82d75042015-01-26 10:57:07 -080070};
71#define UHID_DATA_MAX 4096
72enum uhid_report_type {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 UHID_FEATURE_REPORT,
75 UHID_OUTPUT_REPORT,
76 UHID_INPUT_REPORT,
Christopher Ferris82d75042015-01-26 10:57:07 -080077};
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79struct uhid_input2_req {
Tao Baod7db5942015-01-28 10:07:51 -080080 __u16 size;
81 __u8 data[UHID_DATA_MAX];
Christopher Ferris82d75042015-01-26 10:57:07 -080082} __attribute__((__packed__));
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84struct uhid_output_req {
Tao Baod7db5942015-01-28 10:07:51 -080085 __u8 data[UHID_DATA_MAX];
86 __u16 size;
87 __u8 rtype;
Christopher Ferris82d75042015-01-26 10:57:07 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89} __attribute__((__packed__));
90struct uhid_get_report_req {
Tao Baod7db5942015-01-28 10:07:51 -080091 __u32 id;
92 __u8 rnum;
Christopher Ferris82d75042015-01-26 10:57:07 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 __u8 rtype;
Christopher Ferris82d75042015-01-26 10:57:07 -080095} __attribute__((__packed__));
96struct uhid_get_report_reply_req {
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 id;
Christopher Ferris82d75042015-01-26 10:57:07 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 __u16 err;
100 __u16 size;
101 __u8 data[UHID_DATA_MAX];
Christopher Ferris82d75042015-01-26 10:57:07 -0800102} __attribute__((__packed__));
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104struct uhid_set_report_req {
Tao Baod7db5942015-01-28 10:07:51 -0800105 __u32 id;
106 __u8 rnum;
107 __u8 rtype;
Christopher Ferris82d75042015-01-26 10:57:07 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u16 size;
110 __u8 data[UHID_DATA_MAX];
Christopher Ferris82d75042015-01-26 10:57:07 -0800111} __attribute__((__packed__));
112struct uhid_set_report_reply_req {
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 __u32 id;
115 __u16 err;
Christopher Ferris82d75042015-01-26 10:57:07 -0800116} __attribute__((__packed__));
117enum uhid_legacy_event_type {
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 UHID_CREATE = __UHID_LEGACY_CREATE,
120 UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV,
121 UHID_INPUT = __UHID_LEGACY_INPUT,
122 UHID_FEATURE = UHID_GET_REPORT,
Christopher Ferris82d75042015-01-26 10:57:07 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY,
Christopher Ferris82d75042015-01-26 10:57:07 -0800125};
126struct uhid_create_req {
Tao Baod7db5942015-01-28 10:07:51 -0800127 __u8 name[128];
Christopher Ferris82d75042015-01-26 10:57:07 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u8 phys[64];
130 __u8 uniq[64];
131 __u8 __user * rd_data;
132 __u16 rd_size;
Christopher Ferris82d75042015-01-26 10:57:07 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 __u16 bus;
135 __u32 vendor;
136 __u32 product;
137 __u32 version;
Christopher Ferris82d75042015-01-26 10:57:07 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 __u32 country;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700140} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -0700141struct uhid_input_req {
Tao Baod7db5942015-01-28 10:07:51 -0800142 __u8 data[UHID_DATA_MAX];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 __u16 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700145} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -0700146struct uhid_output_ev_req {
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u16 type;
Christopher Ferris82d75042015-01-26 10:57:07 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u16 code;
150 __s32 value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700151} __attribute__((__packed__));
152struct uhid_feature_req {
Christopher Ferris82d75042015-01-26 10:57:07 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u32 id;
155 __u8 rnum;
156 __u8 rtype;
Ben Cheng655a7c02013-10-16 16:09:24 -0700157} __attribute__((__packed__));
Christopher Ferris82d75042015-01-26 10:57:07 -0800158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700159struct uhid_feature_answer_req {
Tao Baod7db5942015-01-28 10:07:51 -0800160 __u32 id;
161 __u16 err;
162 __u16 size;
Christopher Ferris82d75042015-01-26 10:57:07 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 __u8 data[UHID_DATA_MAX];
Ben Cheng655a7c02013-10-16 16:09:24 -0700165} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -0700166struct uhid_event {
Tao Baod7db5942015-01-28 10:07:51 -0800167 __u32 type;
Christopher Ferris82d75042015-01-26 10:57:07 -0800168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 union {
170 struct uhid_create_req create;
171 struct uhid_input_req input;
172 struct uhid_output_req output;
Christopher Ferris82d75042015-01-26 10:57:07 -0800173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 struct uhid_output_ev_req output_ev;
175 struct uhid_feature_req feature;
176 struct uhid_get_report_req get_report;
177 struct uhid_feature_answer_req feature_answer;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800179 struct uhid_get_report_reply_req get_report_reply;
180 struct uhid_create2_req create2;
181 struct uhid_input2_req input2;
182 struct uhid_set_report_req set_report;
Christopher Ferris82d75042015-01-26 10:57:07 -0800183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 struct uhid_set_report_reply_req set_report_reply;
185 struct uhid_start_req start;
186 } u;
Ben Cheng655a7c02013-10-16 16:09:24 -0700187} __attribute__((__packed__));
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700189#endif