diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
| commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
| tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/input.h | |
| parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
| parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) | |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/input.h')
| -rw-r--r-- | include/linux/input.h | 142 |
1 files changed, 106 insertions, 36 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 896a92227bc4..771d6d85667d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -34,7 +34,7 @@ struct input_event { | |||
| 34 | * Protocol version. | 34 | * Protocol version. |
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #define EV_VERSION 0x010000 | 37 | #define EV_VERSION 0x010001 |
| 38 | 38 | ||
| 39 | /* | 39 | /* |
| 40 | * IOCTLs (0x00 - 0x7f) | 40 | * IOCTLs (0x00 - 0x7f) |
| @@ -47,6 +47,25 @@ struct input_id { | |||
| 47 | __u16 version; | 47 | __u16 version; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | /** | ||
| 51 | * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls | ||
| 52 | * @value: latest reported value for the axis. | ||
| 53 | * @minimum: specifies minimum value for the axis. | ||
| 54 | * @maximum: specifies maximum value for the axis. | ||
| 55 | * @fuzz: specifies fuzz value that is used to filter noise from | ||
| 56 | * the event stream. | ||
| 57 | * @flat: values that are within this value will be discarded by | ||
| 58 | * joydev interface and reported as 0 instead. | ||
| 59 | * @resolution: specifies resolution for the values reported for | ||
| 60 | * the axis. | ||
| 61 | * | ||
| 62 | * Note that input core does not clamp reported values to the | ||
| 63 | * [minimum, maximum] limits, such task is left to userspace. | ||
| 64 | * | ||
| 65 | * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in | ||
| 66 | * units per millimeter (units/mm), resolution for rotational axes | ||
| 67 | * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. | ||
| 68 | */ | ||
| 50 | struct input_absinfo { | 69 | struct input_absinfo { |
| 51 | __s32 value; | 70 | __s32 value; |
| 52 | __s32 minimum; | 71 | __s32 minimum; |
| @@ -56,25 +75,53 @@ struct input_absinfo { | |||
| 56 | __s32 resolution; | 75 | __s32 resolution; |
| 57 | }; | 76 | }; |
| 58 | 77 | ||
| 78 | /** | ||
| 79 | * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls | ||
| 80 | * @scancode: scancode represented in machine-endian form. | ||
| 81 | * @len: length of the scancode that resides in @scancode buffer. | ||
| 82 | * @index: index in the keymap, may be used instead of scancode | ||
| 83 | * @flags: allows to specify how kernel should handle the request. For | ||
| 84 | * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel | ||
| 85 | * should perform lookup in keymap by @index instead of @scancode | ||
| 86 | * @keycode: key code assigned to this scancode | ||
| 87 | * | ||
| 88 | * The structure is used to retrieve and modify keymap data. Users have | ||
| 89 | * option of performing lookup either by @scancode itself or by @index | ||
| 90 | * in keymap entry. EVIOCGKEYCODE will also return scancode or index | ||
| 91 | * (depending on which element was used to perform lookup). | ||
| 92 | */ | ||
| 93 | struct input_keymap_entry { | ||
| 94 | #define INPUT_KEYMAP_BY_INDEX (1 << 0) | ||
| 95 | __u8 flags; | ||
| 96 | __u8 len; | ||
| 97 | __u16 index; | ||
| 98 | __u32 keycode; | ||
| 99 | __u8 scancode[32]; | ||
| 100 | }; | ||
| 101 | |||
| 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 102 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 103 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
| 61 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| 62 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ | 106 | |
| 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | 107 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| 108 | #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) | ||
| 109 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | ||
| 110 | #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) | ||
| 65 | 111 | ||
| 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| 68 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ | 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
| 115 | #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ | ||
| 69 | 116 | ||
| 70 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ | 117 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
| 71 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 118 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
| 72 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ | 119 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
| 73 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ | 120 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ |
| 74 | 121 | ||
| 75 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ | 122 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ |
| 76 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ | 123 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ |
| 77 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ | 124 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ |
| 78 | 125 | ||
| 79 | #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ | 126 | #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ |
| 80 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ | 127 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
| @@ -83,6 +130,18 @@ struct input_absinfo { | |||
| 83 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ | 130 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| 84 | 131 | ||
| 85 | /* | 132 | /* |
| 133 | * Device properties and quirks | ||
| 134 | */ | ||
| 135 | |||
| 136 | #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ | ||
| 137 | #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ | ||
| 138 | #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ | ||
| 139 | #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ | ||
| 140 | |||
| 141 | #define INPUT_PROP_MAX 0x1f | ||
| 142 | #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) | ||
| 143 | |||
| 144 | /* | ||
| 86 | * Event types | 145 | * Event types |
| 87 | */ | 146 | */ |
| 88 | 147 | ||
| @@ -108,6 +167,7 @@ struct input_absinfo { | |||
| 108 | #define SYN_REPORT 0 | 167 | #define SYN_REPORT 0 |
| 109 | #define SYN_CONFIG 1 | 168 | #define SYN_CONFIG 1 |
| 110 | #define SYN_MT_REPORT 2 | 169 | #define SYN_MT_REPORT 2 |
| 170 | #define SYN_DROPPED 3 | ||
| 111 | 171 | ||
| 112 | /* | 172 | /* |
| 113 | * Keys and buttons | 173 | * Keys and buttons |
| @@ -494,8 +554,8 @@ struct input_absinfo { | |||
| 494 | #define KEY_DVD 0x185 /* Media Select DVD */ | 554 | #define KEY_DVD 0x185 /* Media Select DVD */ |
| 495 | #define KEY_AUX 0x186 | 555 | #define KEY_AUX 0x186 |
| 496 | #define KEY_MP3 0x187 | 556 | #define KEY_MP3 0x187 |
| 497 | #define KEY_AUDIO 0x188 | 557 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ |
| 498 | #define KEY_VIDEO 0x189 | 558 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ |
| 499 | #define KEY_DIRECTORY 0x18a | 559 | #define KEY_DIRECTORY 0x18a |
| 500 | #define KEY_LIST 0x18b | 560 | #define KEY_LIST 0x18b |
| 501 | #define KEY_MEMO 0x18c /* Media Select Messages */ | 561 | #define KEY_MEMO 0x18c /* Media Select Messages */ |
| @@ -544,6 +604,9 @@ struct input_absinfo { | |||
| 544 | #define KEY_FRAMEFORWARD 0x1b5 | 604 | #define KEY_FRAMEFORWARD 0x1b5 |
| 545 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 605 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
| 546 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | 606 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
| 607 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | ||
| 608 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | ||
| 609 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
| 547 | 610 | ||
| 548 | #define KEY_DEL_EOL 0x1c0 | 611 | #define KEY_DEL_EOL 0x1c0 |
| 549 | #define KEY_DEL_EOS 0x1c1 | 612 | #define KEY_DEL_EOS 0x1c1 |
| @@ -599,6 +662,17 @@ struct input_absinfo { | |||
| 599 | #define KEY_CAMERA_FOCUS 0x210 | 662 | #define KEY_CAMERA_FOCUS 0x210 |
| 600 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | 663 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
| 601 | 664 | ||
| 665 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
| 666 | #define KEY_TOUCHPAD_ON 0x213 | ||
| 667 | #define KEY_TOUCHPAD_OFF 0x214 | ||
| 668 | |||
| 669 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
| 670 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
| 671 | #define KEY_CAMERA_UP 0x217 | ||
| 672 | #define KEY_CAMERA_DOWN 0x218 | ||
| 673 | #define KEY_CAMERA_LEFT 0x219 | ||
| 674 | #define KEY_CAMERA_RIGHT 0x21a | ||
| 675 | |||
| 602 | #define BTN_TRIGGER_HAPPY 0x2c0 | 676 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 603 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 677 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 604 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 678 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
| @@ -708,11 +782,12 @@ struct input_absinfo { | |||
| 708 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | 782 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
| 709 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 783 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
| 710 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | 784 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
| 785 | #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ | ||
| 711 | 786 | ||
| 712 | #ifdef __KERNEL__ | 787 | #ifdef __KERNEL__ |
| 713 | /* Implementation details, userspace should not care about these */ | 788 | /* Implementation details, userspace should not care about these */ |
| 714 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR | 789 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR |
| 715 | #define ABS_MT_LAST ABS_MT_PRESSURE | 790 | #define ABS_MT_LAST ABS_MT_DISTANCE |
| 716 | #endif | 791 | #endif |
| 717 | 792 | ||
| 718 | #define ABS_MAX 0x3f | 793 | #define ABS_MAX 0x3f |
| @@ -736,6 +811,7 @@ struct input_absinfo { | |||
| 736 | #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ | 811 | #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ |
| 737 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ | 812 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ |
| 738 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ | 813 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
| 814 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ | ||
| 739 | #define SW_MAX 0x0f | 815 | #define SW_MAX 0x0f |
| 740 | #define SW_CNT (SW_MAX+1) | 816 | #define SW_CNT (SW_MAX+1) |
| 741 | 817 | ||
| @@ -823,6 +899,7 @@ struct input_absinfo { | |||
| 823 | */ | 899 | */ |
| 824 | #define MT_TOOL_FINGER 0 | 900 | #define MT_TOOL_FINGER 0 |
| 825 | #define MT_TOOL_PEN 1 | 901 | #define MT_TOOL_PEN 1 |
| 902 | #define MT_TOOL_MAX 1 | ||
| 826 | 903 | ||
| 827 | /* | 904 | /* |
| 828 | * Values describing the status of a force-feedback effect | 905 | * Values describing the status of a force-feedback effect |
| @@ -1058,19 +1135,12 @@ struct ff_effect { | |||
| 1058 | #include <linux/mod_devicetable.h> | 1135 | #include <linux/mod_devicetable.h> |
| 1059 | 1136 | ||
| 1060 | /** | 1137 | /** |
| 1061 | * struct input_mt_slot - represents the state of an input MT slot | ||
| 1062 | * @abs: holds current values of ABS_MT axes for this slot | ||
| 1063 | */ | ||
| 1064 | struct input_mt_slot { | ||
| 1065 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
| 1066 | }; | ||
| 1067 | |||
| 1068 | /** | ||
| 1069 | * struct input_dev - represents an input device | 1138 | * struct input_dev - represents an input device |
| 1070 | * @name: name of the device | 1139 | * @name: name of the device |
| 1071 | * @phys: physical path to the device in the system hierarchy | 1140 | * @phys: physical path to the device in the system hierarchy |
| 1072 | * @uniq: unique identification code for the device (if device has it) | 1141 | * @uniq: unique identification code for the device (if device has it) |
| 1073 | * @id: id of the device (struct input_id) | 1142 | * @id: id of the device (struct input_id) |
| 1143 | * @propbit: bitmap of device properties and quirks | ||
| 1074 | * @evbit: bitmap of types of events supported by the device (EV_KEY, | 1144 | * @evbit: bitmap of types of events supported by the device (EV_KEY, |
| 1075 | * EV_REL, etc.) | 1145 | * EV_REL, etc.) |
| 1076 | * @keybit: bitmap of keys/buttons this device has | 1146 | * @keybit: bitmap of keys/buttons this device has |
| @@ -1088,13 +1158,11 @@ struct input_mt_slot { | |||
| 1088 | * @keycodemax: size of keycode table | 1158 | * @keycodemax: size of keycode table |
| 1089 | * @keycodesize: size of elements in keycode table | 1159 | * @keycodesize: size of elements in keycode table |
| 1090 | * @keycode: map of scancodes to keycodes for this device | 1160 | * @keycode: map of scancodes to keycodes for this device |
| 1161 | * @getkeycode: optional legacy method to retrieve current keymap. | ||
| 1091 | * @setkeycode: optional method to alter current keymap, used to implement | 1162 | * @setkeycode: optional method to alter current keymap, used to implement |
| 1092 | * sparse keymaps. If not supplied default mechanism will be used. | 1163 | * sparse keymaps. If not supplied default mechanism will be used. |
| 1093 | * The method is being called while holding event_lock and thus must | 1164 | * The method is being called while holding event_lock and thus must |
| 1094 | * not sleep | 1165 | * not sleep |
| 1095 | * @getkeycode: optional method to retrieve current keymap. If not supplied | ||
| 1096 | * default mechanism will be used. The method is being called while | ||
| 1097 | * holding event_lock and thus must not sleep | ||
| 1098 | * @ff: force feedback structure associated with the device if device | 1166 | * @ff: force feedback structure associated with the device if device |
| 1099 | * supports force feedback effects | 1167 | * supports force feedback effects |
| 1100 | * @repeat_key: stores key code of the last key pressed; used to implement | 1168 | * @repeat_key: stores key code of the last key pressed; used to implement |
| @@ -1105,7 +1173,8 @@ struct input_mt_slot { | |||
| 1105 | * of tracked contacts | 1173 | * of tracked contacts |
| 1106 | * @mtsize: number of MT slots the device uses | 1174 | * @mtsize: number of MT slots the device uses |
| 1107 | * @slot: MT slot currently being transmitted | 1175 | * @slot: MT slot currently being transmitted |
| 1108 | * @absinfo: array of &struct absinfo elements holding information | 1176 | * @trkid: stores MT tracking ID for the current contact |
| 1177 | * @absinfo: array of &struct input_absinfo elements holding information | ||
| 1109 | * about absolute axes (current value, min, max, flat, fuzz, | 1178 | * about absolute axes (current value, min, max, flat, fuzz, |
| 1110 | * resolution) | 1179 | * resolution) |
| 1111 | * @key: reflects current state of device's keys/buttons | 1180 | * @key: reflects current state of device's keys/buttons |
| @@ -1153,6 +1222,8 @@ struct input_dev { | |||
| 1153 | const char *uniq; | 1222 | const char *uniq; |
| 1154 | struct input_id id; | 1223 | struct input_id id; |
| 1155 | 1224 | ||
| 1225 | unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)]; | ||
| 1226 | |||
| 1156 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; | 1227 | unsigned long evbit[BITS_TO_LONGS(EV_CNT)]; |
| 1157 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; | 1228 | unsigned long keybit[BITS_TO_LONGS(KEY_CNT)]; |
| 1158 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; | 1229 | unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; |
| @@ -1168,10 +1239,12 @@ struct input_dev { | |||
| 1168 | unsigned int keycodemax; | 1239 | unsigned int keycodemax; |
| 1169 | unsigned int keycodesize; | 1240 | unsigned int keycodesize; |
| 1170 | void *keycode; | 1241 | void *keycode; |
| 1242 | |||
| 1171 | int (*setkeycode)(struct input_dev *dev, | 1243 | int (*setkeycode)(struct input_dev *dev, |
| 1172 | unsigned int scancode, unsigned int keycode); | 1244 | const struct input_keymap_entry *ke, |
| 1245 | unsigned int *old_keycode); | ||
| 1173 | int (*getkeycode)(struct input_dev *dev, | 1246 | int (*getkeycode)(struct input_dev *dev, |
| 1174 | unsigned int scancode, unsigned int *keycode); | 1247 | struct input_keymap_entry *ke); |
| 1175 | 1248 | ||
| 1176 | struct ff_device *ff; | 1249 | struct ff_device *ff; |
| 1177 | 1250 | ||
| @@ -1183,6 +1256,7 @@ struct input_dev { | |||
| 1183 | struct input_mt_slot *mt; | 1256 | struct input_mt_slot *mt; |
| 1184 | int mtsize; | 1257 | int mtsize; |
| 1185 | int slot; | 1258 | int slot; |
| 1259 | int trkid; | ||
| 1186 | 1260 | ||
| 1187 | struct input_absinfo *absinfo; | 1261 | struct input_absinfo *absinfo; |
| 1188 | 1262 | ||
| @@ -1196,7 +1270,7 @@ struct input_dev { | |||
| 1196 | int (*flush)(struct input_dev *dev, struct file *file); | 1270 | int (*flush)(struct input_dev *dev, struct file *file); |
| 1197 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1271 | int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
| 1198 | 1272 | ||
| 1199 | struct input_handle *grab; | 1273 | struct input_handle __rcu *grab; |
| 1200 | 1274 | ||
| 1201 | spinlock_t event_lock; | 1275 | spinlock_t event_lock; |
| 1202 | struct mutex mutex; | 1276 | struct mutex mutex; |
| @@ -1375,6 +1449,8 @@ static inline void input_set_drvdata(struct input_dev *dev, void *data) | |||
| 1375 | int __must_check input_register_device(struct input_dev *); | 1449 | int __must_check input_register_device(struct input_dev *); |
| 1376 | void input_unregister_device(struct input_dev *); | 1450 | void input_unregister_device(struct input_dev *); |
| 1377 | 1451 | ||
| 1452 | void input_reset_device(struct input_dev *); | ||
| 1453 | |||
| 1378 | int __must_check input_register_handler(struct input_handler *); | 1454 | int __must_check input_register_handler(struct input_handler *); |
| 1379 | void input_unregister_handler(struct input_handler *); | 1455 | void input_unregister_handler(struct input_handler *); |
| 1380 | 1456 | ||
| @@ -1390,7 +1466,7 @@ void input_release_device(struct input_handle *); | |||
| 1390 | int input_open_device(struct input_handle *); | 1466 | int input_open_device(struct input_handle *); |
| 1391 | void input_close_device(struct input_handle *); | 1467 | void input_close_device(struct input_handle *); |
| 1392 | 1468 | ||
| 1393 | int input_flush_device(struct input_handle* handle, struct file* file); | 1469 | int input_flush_device(struct input_handle *handle, struct file *file); |
| 1394 | 1470 | ||
| 1395 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); | 1471 | void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); |
| 1396 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1472 | void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
| @@ -1430,11 +1506,6 @@ static inline void input_mt_sync(struct input_dev *dev) | |||
| 1430 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | 1506 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); |
| 1431 | } | 1507 | } |
| 1432 | 1508 | ||
| 1433 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
| 1434 | { | ||
| 1435 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
| 1436 | } | ||
| 1437 | |||
| 1438 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1509 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
| 1439 | 1510 | ||
| 1440 | /** | 1511 | /** |
| @@ -1478,10 +1549,12 @@ INPUT_GENERATE_ABS_ACCESSORS(fuzz, fuzz) | |||
| 1478 | INPUT_GENERATE_ABS_ACCESSORS(flat, flat) | 1549 | INPUT_GENERATE_ABS_ACCESSORS(flat, flat) |
| 1479 | INPUT_GENERATE_ABS_ACCESSORS(res, resolution) | 1550 | INPUT_GENERATE_ABS_ACCESSORS(res, resolution) |
| 1480 | 1551 | ||
| 1481 | int input_get_keycode(struct input_dev *dev, | 1552 | int input_scancode_to_scalar(const struct input_keymap_entry *ke, |
| 1482 | unsigned int scancode, unsigned int *keycode); | 1553 | unsigned int *scancode); |
| 1554 | |||
| 1555 | int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke); | ||
| 1483 | int input_set_keycode(struct input_dev *dev, | 1556 | int input_set_keycode(struct input_dev *dev, |
| 1484 | unsigned int scancode, unsigned int keycode); | 1557 | const struct input_keymap_entry *ke); |
| 1485 | 1558 | ||
| 1486 | extern struct class input_class; | 1559 | extern struct class input_class; |
| 1487 | 1560 | ||
| @@ -1545,8 +1618,5 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); | |||
| 1545 | int input_ff_create_memless(struct input_dev *dev, void *data, | 1618 | int input_ff_create_memless(struct input_dev *dev, void *data, |
| 1546 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); | 1619 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); |
| 1547 | 1620 | ||
| 1548 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots); | ||
| 1549 | void input_mt_destroy_slots(struct input_dev *dev); | ||
| 1550 | |||
| 1551 | #endif | 1621 | #endif |
| 1552 | #endif | 1622 | #endif |
