diff options
Diffstat (limited to 'include/linux/input.h')
| -rw-r--r-- | include/linux/input.h | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index 7be8a6537b5..dc24effb6d0 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -376,8 +376,9 @@ struct input_absinfo { | |||
| 376 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | 376 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ |
| 377 | 377 | ||
| 378 | #define KEY_WIMAX 246 | 378 | #define KEY_WIMAX 246 |
| 379 | #define KEY_RFKILL 247 /* Key that controls all radios */ | ||
| 379 | 380 | ||
| 380 | /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ | 381 | /* Code 255 is reserved for special needs of AT keyboard driver */ |
| 381 | 382 | ||
| 382 | #define BTN_MISC 0x100 | 383 | #define BTN_MISC 0x100 |
| 383 | #define BTN_0 0x100 | 384 | #define BTN_0 0x100 |
| @@ -596,6 +597,49 @@ struct input_absinfo { | |||
| 596 | #define KEY_NUMERIC_POUND 0x20b | 597 | #define KEY_NUMERIC_POUND 0x20b |
| 597 | 598 | ||
| 598 | #define KEY_CAMERA_FOCUS 0x210 | 599 | #define KEY_CAMERA_FOCUS 0x210 |
| 600 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | ||
| 601 | |||
| 602 | #define BTN_TRIGGER_HAPPY 0x2c0 | ||
| 603 | #define BTN_TRIGGER_HAPPY1 0x2c0 | ||
| 604 | #define BTN_TRIGGER_HAPPY2 0x2c1 | ||
| 605 | #define BTN_TRIGGER_HAPPY3 0x2c2 | ||
| 606 | #define BTN_TRIGGER_HAPPY4 0x2c3 | ||
| 607 | #define BTN_TRIGGER_HAPPY5 0x2c4 | ||
| 608 | #define BTN_TRIGGER_HAPPY6 0x2c5 | ||
| 609 | #define BTN_TRIGGER_HAPPY7 0x2c6 | ||
| 610 | #define BTN_TRIGGER_HAPPY8 0x2c7 | ||
| 611 | #define BTN_TRIGGER_HAPPY9 0x2c8 | ||
| 612 | #define BTN_TRIGGER_HAPPY10 0x2c9 | ||
| 613 | #define BTN_TRIGGER_HAPPY11 0x2ca | ||
| 614 | #define BTN_TRIGGER_HAPPY12 0x2cb | ||
| 615 | #define BTN_TRIGGER_HAPPY13 0x2cc | ||
| 616 | #define BTN_TRIGGER_HAPPY14 0x2cd | ||
| 617 | #define BTN_TRIGGER_HAPPY15 0x2ce | ||
| 618 | #define BTN_TRIGGER_HAPPY16 0x2cf | ||
| 619 | #define BTN_TRIGGER_HAPPY17 0x2d0 | ||
| 620 | #define BTN_TRIGGER_HAPPY18 0x2d1 | ||
| 621 | #define BTN_TRIGGER_HAPPY19 0x2d2 | ||
| 622 | #define BTN_TRIGGER_HAPPY20 0x2d3 | ||
| 623 | #define BTN_TRIGGER_HAPPY21 0x2d4 | ||
| 624 | #define BTN_TRIGGER_HAPPY22 0x2d5 | ||
| 625 | #define BTN_TRIGGER_HAPPY23 0x2d6 | ||
| 626 | #define BTN_TRIGGER_HAPPY24 0x2d7 | ||
| 627 | #define BTN_TRIGGER_HAPPY25 0x2d8 | ||
| 628 | #define BTN_TRIGGER_HAPPY26 0x2d9 | ||
| 629 | #define BTN_TRIGGER_HAPPY27 0x2da | ||
| 630 | #define BTN_TRIGGER_HAPPY28 0x2db | ||
| 631 | #define BTN_TRIGGER_HAPPY29 0x2dc | ||
| 632 | #define BTN_TRIGGER_HAPPY30 0x2dd | ||
| 633 | #define BTN_TRIGGER_HAPPY31 0x2de | ||
| 634 | #define BTN_TRIGGER_HAPPY32 0x2df | ||
| 635 | #define BTN_TRIGGER_HAPPY33 0x2e0 | ||
| 636 | #define BTN_TRIGGER_HAPPY34 0x2e1 | ||
| 637 | #define BTN_TRIGGER_HAPPY35 0x2e2 | ||
| 638 | #define BTN_TRIGGER_HAPPY36 0x2e3 | ||
| 639 | #define BTN_TRIGGER_HAPPY37 0x2e4 | ||
| 640 | #define BTN_TRIGGER_HAPPY38 0x2e5 | ||
| 641 | #define BTN_TRIGGER_HAPPY39 0x2e6 | ||
| 642 | #define BTN_TRIGGER_HAPPY40 0x2e7 | ||
| 599 | 643 | ||
| 600 | /* We avoid low common keys in module aliases so they don't get huge. */ | 644 | /* We avoid low common keys in module aliases so they don't get huge. */ |
| 601 | #define KEY_MIN_INTERESTING KEY_MUTE | 645 | #define KEY_MIN_INTERESTING KEY_MUTE |
| @@ -660,6 +704,7 @@ struct input_absinfo { | |||
| 660 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | 704 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ |
| 661 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | 705 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ |
| 662 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 706 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
| 707 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | ||
| 663 | 708 | ||
| 664 | #define ABS_MAX 0x3f | 709 | #define ABS_MAX 0x3f |
| 665 | #define ABS_CNT (ABS_MAX+1) | 710 | #define ABS_CNT (ABS_MAX+1) |
| @@ -1198,6 +1243,10 @@ struct input_handle; | |||
| 1198 | * @event: event handler. This method is being called by input core with | 1243 | * @event: event handler. This method is being called by input core with |
| 1199 | * interrupts disabled and dev->event_lock spinlock held and so | 1244 | * interrupts disabled and dev->event_lock spinlock held and so |
| 1200 | * it may not sleep | 1245 | * it may not sleep |
| 1246 | * @filter: similar to @event; separates normal event handlers from | ||
| 1247 | * "filters". | ||
| 1248 | * @match: called after comparing device's id with handler's id_table | ||
| 1249 | * to perform fine-grained matching between device and handler | ||
| 1201 | * @connect: called when attaching a handler to an input device | 1250 | * @connect: called when attaching a handler to an input device |
| 1202 | * @disconnect: disconnects a handler from input device | 1251 | * @disconnect: disconnects a handler from input device |
| 1203 | * @start: starts handler for given handle. This function is called by | 1252 | * @start: starts handler for given handle. This function is called by |
| @@ -1209,8 +1258,6 @@ struct input_handle; | |||
| 1209 | * @name: name of the handler, to be shown in /proc/bus/input/handlers | 1258 | * @name: name of the handler, to be shown in /proc/bus/input/handlers |
| 1210 | * @id_table: pointer to a table of input_device_ids this driver can | 1259 | * @id_table: pointer to a table of input_device_ids this driver can |
| 1211 | * handle | 1260 | * handle |
| 1212 | * @blacklist: pointer to a table of input_device_ids this driver should | ||
| 1213 | * ignore even if they match @id_table | ||
| 1214 | * @h_list: list of input handles associated with the handler | 1261 | * @h_list: list of input handles associated with the handler |
| 1215 | * @node: for placing the driver onto input_handler_list | 1262 | * @node: for placing the driver onto input_handler_list |
| 1216 | * | 1263 | * |
| @@ -1219,6 +1266,11 @@ struct input_handle; | |||
| 1219 | * same time. All of them will get their copy of input event generated by | 1266 | * same time. All of them will get their copy of input event generated by |
| 1220 | * the device. | 1267 | * the device. |
| 1221 | * | 1268 | * |
| 1269 | * The very same structure is used to implement input filters. Input core | ||
| 1270 | * allows filters to run first and will not pass event to regular handlers | ||
| 1271 | * if any of the filters indicate that the event should be filtered (by | ||
| 1272 | * returning %true from their filter() method). | ||
| 1273 | * | ||
| 1222 | * Note that input core serializes calls to connect() and disconnect() | 1274 | * Note that input core serializes calls to connect() and disconnect() |
| 1223 | * methods. | 1275 | * methods. |
| 1224 | */ | 1276 | */ |
| @@ -1227,6 +1279,8 @@ struct input_handler { | |||
| 1227 | void *private; | 1279 | void *private; |
| 1228 | 1280 | ||
| 1229 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | 1281 | void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); |
| 1282 | bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value); | ||
| 1283 | bool (*match)(struct input_handler *handler, struct input_dev *dev); | ||
| 1230 | int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); | 1284 | int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); |
| 1231 | void (*disconnect)(struct input_handle *handle); | 1285 | void (*disconnect)(struct input_handle *handle); |
| 1232 | void (*start)(struct input_handle *handle); | 1286 | void (*start)(struct input_handle *handle); |
| @@ -1236,7 +1290,6 @@ struct input_handler { | |||
| 1236 | const char *name; | 1290 | const char *name; |
| 1237 | 1291 | ||
| 1238 | const struct input_device_id *id_table; | 1292 | const struct input_device_id *id_table; |
| 1239 | const struct input_device_id *blacklist; | ||
| 1240 | 1293 | ||
| 1241 | struct list_head h_list; | 1294 | struct list_head h_list; |
| 1242 | struct list_head node; | 1295 | struct list_head node; |
