aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 13:38:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 13:38:09 -0500
commit8724fdb53d27d7b59b60c8a399cc67f9abfabb33 (patch)
treeda2de791ed4845780376a5e6f844ab69957d565f /include/linux/input.h
parentbc535154137601400ffe44c2a7be047ca041fe06 (diff)
parent35858adbfca13678af99fb31618ef4428d6dedb0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (62 commits) Input: atkbd - release previously reserved keycodes 248 - 254 Input: add KEY_WPS_BUTTON definition Input: ads7846 - add regulator support Input: winbond-cir - fix suspend/resume Input: gamecon - use pr_err() and friends Input: gamecon - constify some of the setup structures Input: gamecon - simplify pad type handling Input: gamecon - simplify coordinate calculation for PSX Input: gamecon - fix some formatting issues Input: gamecon - add rumble support for N64 pads Input: wacom - add device type to device name string Input: s3c24xx_ts - report touch only when stylus is down Input: s3c24xx_ts - re-enable IRQ on resume Input: wacom - constify product features data Input: wacom - use per-device instance of wacom_features Input: sh_keysc - enable building on SH-Mobile ARM Input: wacom - get features from driver info Input: rotary-encoder - set gpio direction for each requested gpio Input: sh_keysc - update the driver with mode 6 Input: sh_keysc - switch to using bitmaps ...
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 f44ee9114401..dc24effb6d0e 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#define BTN_TRIGGER_HAPPY 0x2c0 602#define BTN_TRIGGER_HAPPY 0x2c0
602#define BTN_TRIGGER_HAPPY1 0x2c0 603#define BTN_TRIGGER_HAPPY1 0x2c0
@@ -1242,6 +1243,10 @@ struct input_handle;
1242 * @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
1243 * interrupts disabled and dev->event_lock spinlock held and so 1244 * interrupts disabled and dev->event_lock spinlock held and so
1244 * 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
1245 * @connect: called when attaching a handler to an input device 1250 * @connect: called when attaching a handler to an input device
1246 * @disconnect: disconnects a handler from input device 1251 * @disconnect: disconnects a handler from input device
1247 * @start: starts handler for given handle. This function is called by 1252 * @start: starts handler for given handle. This function is called by
@@ -1253,8 +1258,6 @@ struct input_handle;
1253 * @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
1254 * @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
1255 * handle 1260 * handle
1256 * @blacklist: pointer to a table of input_device_ids this driver should
1257 * ignore even if they match @id_table
1258 * @h_list: list of input handles associated with the handler 1261 * @h_list: list of input handles associated with the handler
1259 * @node: for placing the driver onto input_handler_list 1262 * @node: for placing the driver onto input_handler_list
1260 * 1263 *
@@ -1263,6 +1266,11 @@ struct input_handle;
1263 * 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
1264 * the device. 1267 * the device.
1265 * 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 *
1266 * Note that input core serializes calls to connect() and disconnect() 1274 * Note that input core serializes calls to connect() and disconnect()
1267 * methods. 1275 * methods.
1268 */ 1276 */
@@ -1271,6 +1279,8 @@ struct input_handler {
1271 void *private; 1279 void *private;
1272 1280
1273 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);
1274 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);
1275 void (*disconnect)(struct input_handle *handle); 1285 void (*disconnect)(struct input_handle *handle);
1276 void (*start)(struct input_handle *handle); 1286 void (*start)(struct input_handle *handle);
@@ -1280,7 +1290,6 @@ struct input_handler {
1280 const char *name; 1290 const char *name;
1281 1291
1282 const struct input_device_id *id_table; 1292 const struct input_device_id *id_table;
1283 const struct input_device_id *blacklist;
1284 1293
1285 struct list_head h_list; 1294 struct list_head h_list;
1286 struct list_head node; 1295 struct list_head node;