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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 7be8a6537b57..6c9d3d49fa91 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -1198,6 +1198,8 @@ struct input_handle;
1198 * @event: event handler. This method is being called by input core with 1198 * @event: event handler. This method is being called by input core with
1199 * interrupts disabled and dev->event_lock spinlock held and so 1199 * interrupts disabled and dev->event_lock spinlock held and so
1200 * it may not sleep 1200 * it may not sleep
1201 * @filter: similar to @event; separates normal event handlers from
1202 * "filters".
1201 * @connect: called when attaching a handler to an input device 1203 * @connect: called when attaching a handler to an input device
1202 * @disconnect: disconnects a handler from input device 1204 * @disconnect: disconnects a handler from input device
1203 * @start: starts handler for given handle. This function is called by 1205 * @start: starts handler for given handle. This function is called by
@@ -1219,6 +1221,11 @@ struct input_handle;
1219 * same time. All of them will get their copy of input event generated by 1221 * same time. All of them will get their copy of input event generated by
1220 * the device. 1222 * the device.
1221 * 1223 *
1224 * The very same structure is used to implement input filters. Input core
1225 * allows filters to run first and will not pass event to regular handlers
1226 * if any of the filters indicate that the event should be filtered (by
1227 * returning %true from their filter() method).
1228 *
1222 * Note that input core serializes calls to connect() and disconnect() 1229 * Note that input core serializes calls to connect() and disconnect()
1223 * methods. 1230 * methods.
1224 */ 1231 */
@@ -1227,6 +1234,7 @@ struct input_handler {
1227 void *private; 1234 void *private;
1228 1235
1229 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1236 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1237 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1230 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); 1238 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
1231 void (*disconnect)(struct input_handle *handle); 1239 void (*disconnect)(struct input_handle *handle);
1232 void (*start)(struct input_handle *handle); 1240 void (*start)(struct input_handle *handle);