aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-01 02:55:20 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-01 02:55:20 -0500
commit35858adbfca13678af99fb31618ef4428d6dedb0 (patch)
tree3336feaa61324486945816cb52c347733e7c0821 /include/linux/input.h
parent197d4db752e67160d79fed09968c2140376a80a3 (diff)
parent4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 663208afb64c..889a4801f7be 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -378,7 +378,7 @@ struct input_absinfo {
378#define KEY_WIMAX 246 378#define KEY_WIMAX 246
379#define KEY_RFKILL 247 /* Key that controls all radios */ 379#define KEY_RFKILL 247 /* Key that controls all radios */
380 380
381/* Range 248 - 255 is reserved for special needs of AT keyboard driver */ 381/* Code 255 is reserved for special needs of AT keyboard driver */
382 382
383#define BTN_MISC 0x100 383#define BTN_MISC 0x100
384#define BTN_0 0x100 384#define BTN_0 0x100
@@ -597,6 +597,7 @@ struct input_absinfo {
597#define KEY_NUMERIC_POUND 0x20b 597#define KEY_NUMERIC_POUND 0x20b
598 598
599#define KEY_CAMERA_FOCUS 0x210 599#define KEY_CAMERA_FOCUS 0x210
600#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
600 601
601/* We avoid low common keys in module aliases so they don't get huge. */ 602/* We avoid low common keys in module aliases so they don't get huge. */
602#define KEY_MIN_INTERESTING KEY_MUTE 603#define KEY_MIN_INTERESTING KEY_MUTE
@@ -1200,6 +1201,10 @@ struct input_handle;
1200 * @event: event handler. This method is being called by input core with 1201 * @event: event handler. This method is being called by input core with
1201 * interrupts disabled and dev->event_lock spinlock held and so 1202 * interrupts disabled and dev->event_lock spinlock held and so
1202 * it may not sleep 1203 * it may not sleep
1204 * @filter: similar to @event; separates normal event handlers from
1205 * "filters".
1206 * @match: called after comparing device's id with handler's id_table
1207 * to perform fine-grained matching between device and handler
1203 * @connect: called when attaching a handler to an input device 1208 * @connect: called when attaching a handler to an input device
1204 * @disconnect: disconnects a handler from input device 1209 * @disconnect: disconnects a handler from input device
1205 * @start: starts handler for given handle. This function is called by 1210 * @start: starts handler for given handle. This function is called by
@@ -1211,8 +1216,6 @@ struct input_handle;
1211 * @name: name of the handler, to be shown in /proc/bus/input/handlers 1216 * @name: name of the handler, to be shown in /proc/bus/input/handlers
1212 * @id_table: pointer to a table of input_device_ids this driver can 1217 * @id_table: pointer to a table of input_device_ids this driver can
1213 * handle 1218 * handle
1214 * @blacklist: pointer to a table of input_device_ids this driver should
1215 * ignore even if they match @id_table
1216 * @h_list: list of input handles associated with the handler 1219 * @h_list: list of input handles associated with the handler
1217 * @node: for placing the driver onto input_handler_list 1220 * @node: for placing the driver onto input_handler_list
1218 * 1221 *
@@ -1221,6 +1224,11 @@ struct input_handle;
1221 * same time. All of them will get their copy of input event generated by 1224 * same time. All of them will get their copy of input event generated by
1222 * the device. 1225 * the device.
1223 * 1226 *
1227 * The very same structure is used to implement input filters. Input core
1228 * allows filters to run first and will not pass event to regular handlers
1229 * if any of the filters indicate that the event should be filtered (by
1230 * returning %true from their filter() method).
1231 *
1224 * Note that input core serializes calls to connect() and disconnect() 1232 * Note that input core serializes calls to connect() and disconnect()
1225 * methods. 1233 * methods.
1226 */ 1234 */
@@ -1229,6 +1237,8 @@ struct input_handler {
1229 void *private; 1237 void *private;
1230 1238
1231 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1239 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1240 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1241 bool (*match)(struct input_handler *handler, struct input_dev *dev);
1232 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); 1242 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
1233 void (*disconnect)(struct input_handle *handle); 1243 void (*disconnect)(struct input_handle *handle);
1234 void (*start)(struct input_handle *handle); 1244 void (*start)(struct input_handle *handle);
@@ -1238,7 +1248,6 @@ struct input_handler {
1238 const char *name; 1248 const char *name;
1239 1249
1240 const struct input_device_id *id_table; 1250 const struct input_device_id *id_table;
1241 const struct input_device_id *blacklist;
1242 1251
1243 struct list_head h_list; 1252 struct list_head h_list;
1244 struct list_head node; 1253 struct list_head node;