diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/input/mt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index 53f5bf168ff9..94989189878d 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
@@ -15,12 +15,17 @@ | |||
15 | 15 | ||
16 | #define TRKID_MAX 0xffff | 16 | #define TRKID_MAX 0xffff |
17 | 17 | ||
18 | #define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */ | ||
19 | #define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */ | ||
20 | #define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */ | ||
18 | /** | 21 | /** |
19 | * struct input_mt_slot - represents the state of an input MT slot | 22 | * struct input_mt_slot - represents the state of an input MT slot |
20 | * @abs: holds current values of ABS_MT axes for this slot | 23 | * @abs: holds current values of ABS_MT axes for this slot |
24 | * @frame: last frame at which input_mt_report_slot_state() was called | ||
21 | */ | 25 | */ |
22 | struct input_mt_slot { | 26 | struct input_mt_slot { |
23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | 27 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; |
28 | unsigned int frame; | ||
24 | }; | 29 | }; |
25 | 30 | ||
26 | /** | 31 | /** |
@@ -29,6 +34,7 @@ struct input_mt_slot { | |||
29 | * @num_slots: number of MT slots the device uses | 34 | * @num_slots: number of MT slots the device uses |
30 | * @slot: MT slot currently being transmitted | 35 | * @slot: MT slot currently being transmitted |
31 | * @flags: input_mt operation flags | 36 | * @flags: input_mt operation flags |
37 | * @frame: increases every time input_mt_sync_frame() is called | ||
32 | * @slots: array of slots holding current values of tracked contacts | 38 | * @slots: array of slots holding current values of tracked contacts |
33 | */ | 39 | */ |
34 | struct input_mt { | 40 | struct input_mt { |
@@ -36,6 +42,7 @@ struct input_mt { | |||
36 | int num_slots; | 42 | int num_slots; |
37 | int slot; | 43 | int slot; |
38 | unsigned int flags; | 44 | unsigned int flags; |
45 | unsigned int frame; | ||
39 | struct input_mt_slot slots[]; | 46 | struct input_mt_slot slots[]; |
40 | }; | 47 | }; |
41 | 48 | ||
@@ -81,4 +88,6 @@ void input_mt_report_slot_state(struct input_dev *dev, | |||
81 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 88 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
82 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | 89 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); |
83 | 90 | ||
91 | void input_mt_sync_frame(struct input_dev *dev); | ||
92 | |||
84 | #endif | 93 | #endif |