blob: 7b98ddaa590f9b0cfdb31fac5ffd7875d4d789a3 [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_INPUT_H
20#define _UAPI_INPUT_H
21#include <sys/time.h>
22#include <sys/ioctl.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <sys/types.h>
25#include <linux/types.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#include "input-event-codes.h"
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct input_event {
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080029 struct timeval time;
Tao Baod7db5942015-01-28 10:07:51 -080030 __u16 type;
31 __u16 code;
32 __s32 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080034};
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define EV_VERSION 0x010001
36struct input_id {
Tao Baod7db5942015-01-28 10:07:51 -080037 __u16 bustype;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 __u16 vendor;
Tao Baod7db5942015-01-28 10:07:51 -080040 __u16 product;
41 __u16 version;
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080044struct input_absinfo {
Tao Baod7db5942015-01-28 10:07:51 -080045 __s32 value;
46 __s32 minimum;
47 __s32 maximum;
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080049 __s32 fuzz;
Tao Baod7db5942015-01-28 10:07:51 -080050 __s32 flat;
51 __s32 resolution;
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080054struct input_keymap_entry {
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define INPUT_KEYMAP_BY_INDEX (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -080056 __u8 flags;
57 __u8 len;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 __u16 index;
Tao Baod7db5942015-01-28 10:07:51 -080060 __u32 keycode;
61 __u8 scancode[32];
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080064struct input_mask {
65 __u32 type;
66 __u32 codes_size;
67 __u64 codes_ptr;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70#define EVIOCGVERSION _IOR('E', 0x01, int)
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define EVIOCGID _IOR('E', 0x02, struct input_id)
72#define EVIOCGREP _IOR('E', 0x03, unsigned int[2])
Christopher Ferris05d08e92016-02-04 13:16:38 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070074#define EVIOCSREP _IOW('E', 0x03, unsigned int[2])
75#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2])
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
77#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2])
Christopher Ferris05d08e92016-02-04 13:16:38 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)
80#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len)
Ben Cheng655a7c02013-10-16 16:09:24 -070081#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len)
82#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len)
Christopher Ferris05d08e92016-02-04 13:16:38 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len)
85#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len)
Ben Cheng655a7c02013-10-16 16:09:24 -070086#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len)
87#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len)
Christopher Ferris05d08e92016-02-04 13:16:38 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len)
90#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len)
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len)
92#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo)
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo)
95#define EVIOCSFF _IOW('E', 0x80, struct ff_effect)
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define EVIOCRMFF _IOW('E', 0x81, int)
97#define EVIOCGEFFECTS _IOR('E', 0x84, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define EVIOCGRAB _IOW('E', 0x90, int)
Christopher Ferris38062f92014-07-09 15:33:25 -0700100#define EVIOCREVOKE _IOW('E', 0x91, int)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101#define EVIOCGMASK _IOR('E', 0x92, struct input_mask)
102#define EVIOCSMASK _IOW('E', 0x93, struct input_mask)
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800104#define EVIOCSCLOCKID _IOW('E', 0xa0, int)
Ben Cheng655a7c02013-10-16 16:09:24 -0700105#define ID_BUS 0
106#define ID_VENDOR 1
107#define ID_PRODUCT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#define ID_VERSION 3
110#define BUS_PCI 0x01
111#define BUS_ISAPNP 0x02
112#define BUS_USB 0x03
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define BUS_HIL 0x04
115#define BUS_BLUETOOTH 0x05
116#define BUS_VIRTUAL 0x06
117#define BUS_ISA 0x10
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119#define BUS_I8042 0x11
120#define BUS_XTKBD 0x12
121#define BUS_RS232 0x13
122#define BUS_GAMEPORT 0x14
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700124#define BUS_PARPORT 0x15
125#define BUS_AMIGA 0x16
126#define BUS_ADB 0x17
127#define BUS_I2C 0x18
Christopher Ferris05d08e92016-02-04 13:16:38 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#define BUS_HOST 0x19
130#define BUS_GSC 0x1A
131#define BUS_ATARI 0x1B
132#define BUS_SPI 0x1C
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134#define BUS_RMI 0x1D
135#define BUS_CEC 0x1E
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800136#define BUS_INTEL_ISHTP 0x1F
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define MT_TOOL_FINGER 0
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800139#define MT_TOOL_PEN 1
Christopher Ferris05d08e92016-02-04 13:16:38 -0800140#define MT_TOOL_PALM 2
141#define MT_TOOL_MAX 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700142#define FF_STATUS_STOPPED 0x00
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800144#define FF_STATUS_PLAYING 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#define FF_STATUS_MAX 0x01
146struct ff_replay {
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u16 length;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800149 __u16 delay;
Ben Cheng655a7c02013-10-16 16:09:24 -0700150};
151struct ff_trigger {
Tao Baod7db5942015-01-28 10:07:51 -0800152 __u16 button;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800154 __u16 interval;
Ben Cheng655a7c02013-10-16 16:09:24 -0700155};
156struct ff_envelope {
Tao Baod7db5942015-01-28 10:07:51 -0800157 __u16 attack_length;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800159 __u16 attack_level;
Tao Baod7db5942015-01-28 10:07:51 -0800160 __u16 fade_length;
161 __u16 fade_level;
Ben Cheng655a7c02013-10-16 16:09:24 -0700162};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800164struct ff_constant_effect {
Tao Baod7db5942015-01-28 10:07:51 -0800165 __s16 level;
166 struct ff_envelope envelope;
Ben Cheng655a7c02013-10-16 16:09:24 -0700167};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800169struct ff_ramp_effect {
Tao Baod7db5942015-01-28 10:07:51 -0800170 __s16 start_level;
171 __s16 end_level;
Tao Baod7db5942015-01-28 10:07:51 -0800172 struct ff_envelope envelope;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800174};
Ben Cheng655a7c02013-10-16 16:09:24 -0700175struct ff_condition_effect {
Tao Baod7db5942015-01-28 10:07:51 -0800176 __u16 right_saturation;
Tao Baod7db5942015-01-28 10:07:51 -0800177 __u16 left_saturation;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800179 __s16 right_coeff;
Tao Baod7db5942015-01-28 10:07:51 -0800180 __s16 left_coeff;
181 __u16 deadband;
Tao Baod7db5942015-01-28 10:07:51 -0800182 __s16 center;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800184};
Ben Cheng655a7c02013-10-16 16:09:24 -0700185struct ff_periodic_effect {
Tao Baod7db5942015-01-28 10:07:51 -0800186 __u16 waveform;
Tao Baod7db5942015-01-28 10:07:51 -0800187 __u16 period;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800189 __s16 magnitude;
Tao Baod7db5942015-01-28 10:07:51 -0800190 __s16 offset;
191 __u16 phase;
Tao Baod7db5942015-01-28 10:07:51 -0800192 struct ff_envelope envelope;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800194 __u32 custom_len;
Tao Baod7db5942015-01-28 10:07:51 -0800195 __s16 __user * custom_data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700196};
197struct ff_rumble_effect {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800199 __u16 strong_magnitude;
Tao Baod7db5942015-01-28 10:07:51 -0800200 __u16 weak_magnitude;
Ben Cheng655a7c02013-10-16 16:09:24 -0700201};
202struct ff_effect {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800204 __u16 type;
Tao Baod7db5942015-01-28 10:07:51 -0800205 __s16 id;
206 __u16 direction;
Tao Baod7db5942015-01-28 10:07:51 -0800207 struct ff_trigger trigger;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800209 struct ff_replay replay;
Tao Baod7db5942015-01-28 10:07:51 -0800210 union {
211 struct ff_constant_effect constant;
Tao Baod7db5942015-01-28 10:07:51 -0800212 struct ff_ramp_effect ramp;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800214 struct ff_periodic_effect periodic;
Tao Baod7db5942015-01-28 10:07:51 -0800215 struct ff_condition_effect condition[2];
216 struct ff_rumble_effect rumble;
Tao Baod7db5942015-01-28 10:07:51 -0800217 } u;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800219};
Ben Cheng655a7c02013-10-16 16:09:24 -0700220#define FF_RUMBLE 0x50
221#define FF_PERIODIC 0x51
222#define FF_CONSTANT 0x52
Christopher Ferris106b3a82016-08-24 12:15:38 -0700223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800224#define FF_SPRING 0x53
Ben Cheng655a7c02013-10-16 16:09:24 -0700225#define FF_FRICTION 0x54
226#define FF_DAMPER 0x55
227#define FF_INERTIA 0x56
Christopher Ferris106b3a82016-08-24 12:15:38 -0700228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800229#define FF_RAMP 0x57
Ben Cheng655a7c02013-10-16 16:09:24 -0700230#define FF_EFFECT_MIN FF_RUMBLE
231#define FF_EFFECT_MAX FF_RAMP
232#define FF_SQUARE 0x58
Christopher Ferris106b3a82016-08-24 12:15:38 -0700233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800234#define FF_TRIANGLE 0x59
Ben Cheng655a7c02013-10-16 16:09:24 -0700235#define FF_SINE 0x5a
236#define FF_SAW_UP 0x5b
237#define FF_SAW_DOWN 0x5c
Christopher Ferris106b3a82016-08-24 12:15:38 -0700238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800239#define FF_CUSTOM 0x5d
Ben Cheng655a7c02013-10-16 16:09:24 -0700240#define FF_WAVEFORM_MIN FF_SQUARE
241#define FF_WAVEFORM_MAX FF_CUSTOM
242#define FF_GAIN 0x60
Christopher Ferris106b3a82016-08-24 12:15:38 -0700243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800244#define FF_AUTOCENTER 0x61
Christopher Ferris05d08e92016-02-04 13:16:38 -0800245#define FF_MAX_EFFECTS FF_GAIN
Ben Cheng655a7c02013-10-16 16:09:24 -0700246#define FF_MAX 0x7f
Christopher Ferris05d08e92016-02-04 13:16:38 -0800247#define FF_CNT (FF_MAX + 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800249#endif