Input: Send events one packet at a time
[sfrench/cifs-2.6.git] / include / linux / input.h
index 9da4f5796fd63e35c35759ad4e7dba069ce0213a..ba4874302939a8a645c99ac8c53f35772f57cd37 100644 (file)
@@ -1168,6 +1168,18 @@ struct ff_effect {
 #include <linux/timer.h>
 #include <linux/mod_devicetable.h>
 
+/**
+ * struct input_value - input value representation
+ * @type: type of value (EV_KEY, EV_ABS, etc)
+ * @code: the value code
+ * @value: the value
+ */
+struct input_value {
+       __u16 type;
+       __u16 code;
+       __s32 value;
+};
+
 /**
  * struct input_dev - represents an input device
  * @name: name of the device
@@ -1240,7 +1252,6 @@ struct ff_effect {
  *     last user closes the device
  * @going_away: marks devices that are in a middle of unregistering and
  *     causes input_open_device*() fail with -ENODEV.
- * @sync: set to %true when there were no new events since last EV_SYN
  * @dev: driver model's view of this device
  * @h_list: list of input handles associated with the device. When
  *     accessing the list dev->mutex must be held
@@ -1305,12 +1316,14 @@ struct input_dev {
        unsigned int users;
        bool going_away;
 
-       bool sync;
-
        struct device dev;
 
        struct list_head        h_list;
        struct list_head        node;
+
+       unsigned int num_vals;
+       unsigned int max_vals;
+       struct input_value *vals;
 };
 #define to_input_dev(d) container_of(d, struct input_dev, dev)
 
@@ -1371,6 +1384,9 @@ struct input_handle;
  * @event: event handler. This method is being called by input core with
  *     interrupts disabled and dev->event_lock spinlock held and so
  *     it may not sleep
+ * @events: event sequence handler. This method is being called by
+ *     input core with interrupts disabled and dev->event_lock
+ *     spinlock held and so it may not sleep
  * @filter: similar to @event; separates normal event handlers from
  *     "filters".
  * @match: called after comparing device's id with handler's id_table
@@ -1407,6 +1423,8 @@ struct input_handler {
        void *private;
 
        void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
+       void (*events)(struct input_handle *handle,
+                      const struct input_value *vals, unsigned int count);
        bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
        bool (*match)(struct input_handler *handler, struct input_dev *dev);
        int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);