Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 24 | #include <linux/hid.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | enum uhid_event_type { |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 26 | __UHID_LEGACY_CREATE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | UHID_DESTROY, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 29 | UHID_START, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | UHID_STOP, |
| 31 | UHID_OPEN, |
| 32 | UHID_CLOSE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 34 | UHID_OUTPUT, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 35 | __UHID_LEGACY_OUTPUT_EV, |
| 36 | __UHID_LEGACY_INPUT, |
| 37 | UHID_GET_REPORT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 39 | UHID_GET_REPORT_REPLY, |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 40 | UHID_CREATE2, |
| 41 | UHID_INPUT2, |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 42 | UHID_SET_REPORT, |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | UHID_SET_REPORT_REPLY, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 46 | struct uhid_create2_req { |
| 47 | __u8 name[128]; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 49 | __u8 phys[64]; |
| 50 | __u8 uniq[64]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 51 | __u16 rd_size; |
| 52 | __u16 bus; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | __u32 vendor; |
| 55 | __u32 product; |
| 56 | __u32 version; |
| 57 | __u32 country; |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE]; |
| 60 | } __attribute__((__packed__)); |
| 61 | enum uhid_dev_flag { |
| 62 | UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0), |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1), |
| 65 | UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2), |
| 66 | }; |
| 67 | struct uhid_start_req { |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | __u64 dev_flags; |
| 70 | }; |
| 71 | #define UHID_DATA_MAX 4096 |
| 72 | enum uhid_report_type { |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | UHID_FEATURE_REPORT, |
| 75 | UHID_OUTPUT_REPORT, |
| 76 | UHID_INPUT_REPORT, |
| 77 | }; |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | struct uhid_input2_req { |
| 80 | __u16 size; |
| 81 | __u8 data[UHID_DATA_MAX]; |
| 82 | } __attribute__((__packed__)); |
| 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 84 | struct uhid_output_req { |
| 85 | __u8 data[UHID_DATA_MAX]; |
| 86 | __u16 size; |
| 87 | __u8 rtype; |
| 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 89 | } __attribute__((__packed__)); |
| 90 | struct uhid_get_report_req { |
| 91 | __u32 id; |
| 92 | __u8 rnum; |
| 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 94 | __u8 rtype; |
| 95 | } __attribute__((__packed__)); |
| 96 | struct uhid_get_report_reply_req { |
| 97 | __u32 id; |
| 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 99 | __u16 err; |
| 100 | __u16 size; |
| 101 | __u8 data[UHID_DATA_MAX]; |
| 102 | } __attribute__((__packed__)); |
| 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 104 | struct uhid_set_report_req { |
| 105 | __u32 id; |
| 106 | __u8 rnum; |
| 107 | __u8 rtype; |
| 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 109 | __u16 size; |
| 110 | __u8 data[UHID_DATA_MAX]; |
| 111 | } __attribute__((__packed__)); |
| 112 | struct uhid_set_report_reply_req { |
| 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 114 | __u32 id; |
| 115 | __u16 err; |
| 116 | } __attribute__((__packed__)); |
| 117 | enum uhid_legacy_event_type { |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | 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, |
| 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 124 | UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY, |
| 125 | }; |
| 126 | struct uhid_create_req { |
| 127 | __u8 name[128]; |
| 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 129 | __u8 phys[64]; |
| 130 | __u8 uniq[64]; |
| 131 | __u8 __user *rd_data; |
| 132 | __u16 rd_size; |
| 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 134 | __u16 bus; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 135 | __u32 vendor; |
| 136 | __u32 product; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 137 | __u32 version; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 139 | __u32 country; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 140 | } __attribute__((__packed__)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | struct uhid_input_req { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 142 | __u8 data[UHID_DATA_MAX]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | __u16 size; |
| 145 | } __attribute__((__packed__)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | struct uhid_output_ev_req { |
| 147 | __u16 type; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 149 | __u16 code; |
| 150 | __s32 value; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 151 | } __attribute__((__packed__)); |
| 152 | struct uhid_feature_req { |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 154 | __u32 id; |
| 155 | __u8 rnum; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | __u8 rtype; |
| 157 | } __attribute__((__packed__)); |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 159 | struct uhid_feature_answer_req { |
| 160 | __u32 id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 161 | __u16 err; |
| 162 | __u16 size; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | __u8 data[UHID_DATA_MAX]; |
| 165 | } __attribute__((__packed__)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 166 | struct uhid_event { |
| 167 | __u32 type; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 169 | union { |
| 170 | struct uhid_create_req create; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 171 | struct uhid_input_req input; |
| 172 | struct uhid_output_req output; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 173 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 174 | struct uhid_output_ev_req output_ev; |
| 175 | struct uhid_feature_req feature; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 176 | struct uhid_get_report_req get_report; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 177 | struct uhid_feature_answer_req feature_answer; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 178 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 179 | struct uhid_get_report_reply_req get_report_reply; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 180 | struct uhid_create2_req create2; |
| 181 | struct uhid_input2_req input2; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame^] | 182 | struct uhid_set_report_req set_report; |
| 183 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 184 | struct uhid_set_report_reply_req set_report_reply; |
| 185 | struct uhid_start_req start; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 186 | } u; |
| 187 | } __attribute__((__packed__)); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 189 | #endif |