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.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 0ccfc30cd40f..735ceaf1bc2d 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -595,6 +595,8 @@ struct input_absinfo {
595#define KEY_NUMERIC_STAR 0x20a 595#define KEY_NUMERIC_STAR 0x20a
596#define KEY_NUMERIC_POUND 0x20b 596#define KEY_NUMERIC_POUND 0x20b
597 597
598#define KEY_CAMERA_FOCUS 0x210
599
598/* We avoid low common keys in module aliases so they don't get huge. */ 600/* We avoid low common keys in module aliases so they don't get huge. */
599#define KEY_MIN_INTERESTING KEY_MUTE 601#define KEY_MIN_INTERESTING KEY_MUTE
600#define KEY_MAX 0x2ff 602#define KEY_MAX 0x2ff
@@ -658,6 +660,7 @@ struct input_absinfo {
658#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ 660#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
659#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ 661#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */
660#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ 662#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
663#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */
661 664
662#define ABS_MAX 0x3f 665#define ABS_MAX 0x3f
663#define ABS_CNT (ABS_MAX+1) 666#define ABS_CNT (ABS_MAX+1)
@@ -677,6 +680,9 @@ struct input_absinfo {
677#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ 680#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
678#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ 681#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
679#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ 682#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */
683#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */
684#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */
685#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
680#define SW_MAX 0x0f 686#define SW_MAX 0x0f
681#define SW_CNT (SW_MAX+1) 687#define SW_CNT (SW_MAX+1)
682 688
@@ -890,7 +896,7 @@ struct ff_periodic_effect {
890 struct ff_envelope envelope; 896 struct ff_envelope envelope;
891 897
892 __u32 custom_len; 898 __u32 custom_len;
893 __s16 *custom_data; 899 __s16 __user *custom_data;
894}; 900};
895 901
896/** 902/**
@@ -1016,9 +1022,12 @@ struct ff_effect {
1016 * @keycodesize: size of elements in keycode table 1022 * @keycodesize: size of elements in keycode table
1017 * @keycode: map of scancodes to keycodes for this device 1023 * @keycode: map of scancodes to keycodes for this device
1018 * @setkeycode: optional method to alter current keymap, used to implement 1024 * @setkeycode: optional method to alter current keymap, used to implement
1019 * sparse keymaps. If not supplied default mechanism will be used 1025 * sparse keymaps. If not supplied default mechanism will be used.
1026 * The method is being called while holding event_lock and thus must
1027 * not sleep
1020 * @getkeycode: optional method to retrieve current keymap. If not supplied 1028 * @getkeycode: optional method to retrieve current keymap. If not supplied
1021 * default mechanism will be used 1029 * default mechanism will be used. The method is being called while
1030 * holding event_lock and thus must not sleep
1022 * @ff: force feedback structure associated with the device if device 1031 * @ff: force feedback structure associated with the device if device
1023 * supports force feedback effects 1032 * supports force feedback effects
1024 * @repeat_key: stores key code of the last key pressed; used to implement 1033 * @repeat_key: stores key code of the last key pressed; used to implement
@@ -1035,6 +1044,7 @@ struct ff_effect {
1035 * @absmin: minimum values for events coming from absolute axes 1044 * @absmin: minimum values for events coming from absolute axes
1036 * @absfuzz: describes noisiness for axes 1045 * @absfuzz: describes noisiness for axes
1037 * @absflat: size of the center flat position (used by joydev) 1046 * @absflat: size of the center flat position (used by joydev)
1047 * @absres: resolution used for events coming form absolute axes
1038 * @open: this method is called when the very first user calls 1048 * @open: this method is called when the very first user calls
1039 * input_open_device(). The driver must prepare the device 1049 * input_open_device(). The driver must prepare the device
1040 * to start generating events (start polling thread, 1050 * to start generating events (start polling thread,
@@ -1289,6 +1299,9 @@ void input_unregister_device(struct input_dev *);
1289int __must_check input_register_handler(struct input_handler *); 1299int __must_check input_register_handler(struct input_handler *);
1290void input_unregister_handler(struct input_handler *); 1300void input_unregister_handler(struct input_handler *);
1291 1301
1302int input_handler_for_each_handle(struct input_handler *, void *data,
1303 int (*fn)(struct input_handle *, void *));
1304
1292int input_register_handle(struct input_handle *); 1305int input_register_handle(struct input_handle *);
1293void input_unregister_handle(struct input_handle *); 1306void input_unregister_handle(struct input_handle *);
1294 1307
@@ -1377,6 +1390,10 @@ extern struct class input_class;
1377 * methods; erase() is optional. set_gain() and set_autocenter() need 1390 * methods; erase() is optional. set_gain() and set_autocenter() need
1378 * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER 1391 * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
1379 * bits. 1392 * bits.
1393 *
1394 * Note that playback(), set_gain() and set_autocenter() are called with
1395 * dev->event_lock spinlock held and interrupts off and thus may not
1396 * sleep.
1380 */ 1397 */
1381struct ff_device { 1398struct ff_device {
1382 int (*upload)(struct input_dev *dev, struct ff_effect *effect, 1399 int (*upload)(struct input_dev *dev, struct ff_effect *effect,