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.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 9da4f5796fd6..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
@@ -1240,7 +1252,6 @@ struct ff_effect {
1240 * last user closes the device 1252 * last user closes the device
1241 * @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
1242 * causes input_open_device*() fail with -ENODEV. 1254 * causes input_open_device*() fail with -ENODEV.
1243 * @sync: set to %true when there were no new events since last EV_SYN
1244 * @dev: driver model's view of this device 1255 * @dev: driver model's view of this device
1245 * @h_list: list of input handles associated with the device. When 1256 * @h_list: list of input handles associated with the device. When
1246 * accessing the list dev->mutex must be held 1257 * accessing the list dev->mutex must be held
@@ -1305,12 +1316,14 @@ struct input_dev {
1305 unsigned int users; 1316 unsigned int users;
1306 bool going_away; 1317 bool going_away;
1307 1318
1308 bool sync;
1309
1310 struct device dev; 1319 struct device dev;
1311 1320
1312 struct list_head h_list; 1321 struct list_head h_list;
1313 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;
1314}; 1327};
1315#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)
1316 1329
@@ -1371,6 +1384,9 @@ struct input_handle;
1371 * @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
1372 * interrupts disabled and dev->event_lock spinlock held and so 1385 * interrupts disabled and dev->event_lock spinlock held and so
1373 * 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
1374 * @filter: similar to @event; separates normal event handlers from 1390 * @filter: similar to @event; separates normal event handlers from
1375 * "filters". 1391 * "filters".
1376 * @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
@@ -1407,6 +1423,8 @@ struct input_handler {
1407 void *private; 1423 void *private;
1408 1424
1409 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);
1410 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);
1411 bool (*match)(struct input_handler *handler, struct input_dev *dev); 1429 bool (*match)(struct input_handler *handler, struct input_dev *dev);
1412 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);