blob: 6f494b1efbd375ac04a6e9745aa73b58ceda34f0 [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_HIDDEV_H
20#define _UAPI_HIDDEV_H
21#include <linux/types.h>
22struct hiddev_event {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080024 unsigned hid;
25 signed int value;
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
27struct hiddev_devinfo {
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __u32 bustype;
30 __u32 busnum;
31 __u32 devnum;
32 __u32 ifnum;
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 __s16 vendor;
35 __s16 product;
36 __s16 version;
37 __u32 num_applications;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39};
40struct hiddev_collection_info {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u32 index;
42 __u32 type;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u32 usage;
45 __u32 level;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47#define HID_STRING_SIZE 256
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49struct hiddev_string_descriptor {
Tao Baod7db5942015-01-28 10:07:51 -080050 __s32 index;
51 char value[HID_STRING_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct hiddev_report_info {
Tao Baod7db5942015-01-28 10:07:51 -080055 __u32 report_type;
56 __u32 report_id;
57 __u32 num_fields;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59};
60#define HID_REPORT_ID_UNKNOWN 0xffffffff
61#define HID_REPORT_ID_FIRST 0x00000100
62#define HID_REPORT_ID_NEXT 0x00000200
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define HID_REPORT_ID_MASK 0x000000ff
65#define HID_REPORT_ID_MAX 0x000000ff
66#define HID_REPORT_TYPE_INPUT 1
67#define HID_REPORT_TYPE_OUTPUT 2
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define HID_REPORT_TYPE_FEATURE 3
70#define HID_REPORT_TYPE_MIN 1
71#define HID_REPORT_TYPE_MAX 3
72struct hiddev_field_info {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __u32 report_type;
75 __u32 report_id;
76 __u32 field_index;
77 __u32 maxusage;
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 __u32 flags;
80 __u32 physical;
81 __u32 logical;
82 __u32 application;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __s32 logical_minimum;
85 __s32 logical_maximum;
86 __s32 physical_minimum;
87 __s32 physical_maximum;
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 __u32 unit_exponent;
90 __u32 unit;
Ben Cheng655a7c02013-10-16 16:09:24 -070091};
92#define HID_FIELD_CONSTANT 0x001
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define HID_FIELD_VARIABLE 0x002
95#define HID_FIELD_RELATIVE 0x004
96#define HID_FIELD_WRAP 0x008
97#define HID_FIELD_NONLINEAR 0x010
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define HID_FIELD_NO_PREFERRED 0x020
100#define HID_FIELD_NULL_STATE 0x040
101#define HID_FIELD_VOLATILE 0x080
102#define HID_FIELD_BUFFERED_BYTE 0x100
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104struct hiddev_usage_ref {
Tao Baod7db5942015-01-28 10:07:51 -0800105 __u32 report_type;
106 __u32 report_id;
107 __u32 field_index;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u32 usage_index;
110 __u32 usage_code;
111 __s32 value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700112};
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define HID_MAX_MULTI_USAGES 1024
115struct hiddev_usage_ref_multi {
Tao Baod7db5942015-01-28 10:07:51 -0800116 struct hiddev_usage_ref uref;
117 __u32 num_values;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 __s32 values[HID_MAX_MULTI_USAGES];
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
121#define HID_FIELD_INDEX_NONE 0xffffffff
122#define HID_VERSION 0x010004
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define HIDIOCGVERSION _IOR('H', 0x01, int)
125#define HIDIOCAPPLICATION _IO('H', 0x02)
126#define HIDIOCGDEVINFO _IOR('H', 0x03, struct hiddev_devinfo)
127#define HIDIOCGSTRING _IOR('H', 0x04, struct hiddev_string_descriptor)
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define HIDIOCINITREPORT _IO('H', 0x05)
130#define HIDIOCGNAME(len) _IOC(_IOC_READ, 'H', 0x06, len)
131#define HIDIOCGREPORT _IOW('H', 0x07, struct hiddev_report_info)
132#define HIDIOCSREPORT _IOW('H', 0x08, struct hiddev_report_info)
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define HIDIOCGREPORTINFO _IOWR('H', 0x09, struct hiddev_report_info)
135#define HIDIOCGFIELDINFO _IOWR('H', 0x0A, struct hiddev_field_info)
136#define HIDIOCGUSAGE _IOWR('H', 0x0B, struct hiddev_usage_ref)
137#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref)
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref)
140#define HIDIOCGFLAG _IOR('H', 0x0E, int)
141#define HIDIOCSFLAG _IOW('H', 0x0F, int)
142#define HIDIOCGCOLLECTIONINDEX _IOW('H', 0x10, struct hiddev_usage_ref)
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144#define HIDIOCGCOLLECTIONINFO _IOWR('H', 0x11, struct hiddev_collection_info)
145#define HIDIOCGPHYS(len) _IOC(_IOC_READ, 'H', 0x12, len)
146#define HIDIOCGUSAGES _IOWR('H', 0x13, struct hiddev_usage_ref_multi)
147#define HIDIOCSUSAGES _IOW('H', 0x14, struct hiddev_usage_ref_multi)
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149#define HIDDEV_FLAG_UREF 0x1
150#define HIDDEV_FLAG_REPORT 0x2
151#define HIDDEV_FLAGS 0x3
152#endif
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */