aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h35
1 files changed, 23 insertions, 12 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 725dcd0f63a4..ba4874302939 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -1169,6 +1169,18 @@ struct ff_effect {
1169#include <linux/mod_devicetable.h> 1169#include <linux/mod_devicetable.h>
1170 1170
1171/** 1171/**
1172 * struct input_value - input value representation
1173 * @type: type of value (EV_KEY, EV_ABS, etc)
1174 * @code: the value code
1175 * @value: the value
1176 */
1177struct input_value {
1178 __u16 type;
1179 __u16 code;
1180 __s32 value;
1181};
1182
1183/**
1172 * struct input_dev - represents an input device 1184 * struct input_dev - represents an input device
1173 * @name: name of the device 1185 * @name: name of the device
1174 * @phys: physical path to the device in the system hierarchy 1186 * @phys: physical path to the device in the system hierarchy
@@ -1203,11 +1215,7 @@ struct ff_effect {
1203 * software autorepeat 1215 * software autorepeat
1204 * @timer: timer for software autorepeat 1216 * @timer: timer for software autorepeat
1205 * @rep: current values for autorepeat parameters (delay, rate) 1217 * @rep: current values for autorepeat parameters (delay, rate)
1206 * @mt: pointer to array of struct input_mt_slot holding current values 1218 * @mt: pointer to multitouch state
1207 * of tracked contacts
1208 * @mtsize: number of MT slots the device uses
1209 * @slot: MT slot currently being transmitted
1210 * @trkid: stores MT tracking ID for the current contact
1211 * @absinfo: array of &struct input_absinfo elements holding information 1219 * @absinfo: array of &struct input_absinfo elements holding information
1212 * about absolute axes (current value, min, max, flat, fuzz, 1220 * about absolute axes (current value, min, max, flat, fuzz,
1213 * resolution) 1221 * resolution)
@@ -1244,7 +1252,6 @@ struct ff_effect {
1244 * last user closes the device 1252 * last user closes the device
1245 * @going_away: marks devices that are in a middle of unregistering and 1253 * @going_away: marks devices that are in a middle of unregistering and
1246 * causes input_open_device*() fail with -ENODEV. 1254 * causes input_open_device*() fail with -ENODEV.
1247 * @sync: set to %true when there were no new events since last EV_SYN
1248 * @dev: driver model's view of this device 1255 * @dev: driver model's view of this device
1249 * @h_list: list of input handles associated with the device. When 1256 * @h_list: list of input handles associated with the device. When
1250 * accessing the list dev->mutex must be held 1257 * accessing the list dev->mutex must be held
@@ -1287,10 +1294,7 @@ struct input_dev {
1287 1294
1288 int rep[REP_CNT]; 1295 int rep[REP_CNT];
1289 1296
1290 struct input_mt_slot *mt; 1297 struct input_mt *mt;
1291 int mtsize;
1292 int slot;
1293 int trkid;
1294 1298
1295 struct input_absinfo *absinfo; 1299 struct input_absinfo *absinfo;
1296 1300
@@ -1312,12 +1316,14 @@ struct input_dev {
1312 unsigned int users; 1316 unsigned int users;
1313 bool going_away; 1317 bool going_away;
1314 1318
1315 bool sync;
1316
1317 struct device dev; 1319 struct device dev;
1318 1320
1319 struct list_head h_list; 1321 struct list_head h_list;
1320 struct list_head node; 1322 struct list_head node;
1323
1324 unsigned int num_vals;
1325 unsigned int max_vals;
1326 struct input_value *vals;
1321}; 1327};
1322#define to_input_dev(d) container_of(d, struct input_dev, dev) 1328#define to_input_dev(d) container_of(d, struct input_dev, dev)
1323 1329
@@ -1378,6 +1384,9 @@ struct input_handle;
1378 * @event: event handler. This method is being called by input core with 1384 * @event: event handler. This method is being called by input core with
1379 * interrupts disabled and dev->event_lock spinlock held and so 1385 * interrupts disabled and dev->event_lock spinlock held and so
1380 * it may not sleep 1386 * it may not sleep
1387 * @events: event sequence handler. This method is being called by
1388 * input core with interrupts disabled and dev->event_lock
1389 * spinlock held and so it may not sleep
1381 * @filter: similar to @event; separates normal event handlers from 1390 * @filter: similar to @event; separates normal event handlers from
1382 * "filters". 1391 * "filters".
1383 * @match: called after comparing device's id with handler's id_table 1392 * @match: called after comparing device's id with handler's id_table
@@ -1414,6 +1423,8 @@ struct input_handler {
1414 void *private; 1423 void *private;
1415 1424
1416 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1425 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1426 void (*events)(struct input_handle *handle,
1427 const struct input_value *vals, unsigned int count);
1417 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1428 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1418 bool (*match)(struct input_handler *handler, struct input_dev *dev); 1429 bool (*match)(struct input_handler *handler, struct input_dev *dev);
1419 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); 1430 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);