summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/input/mt.h9
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 @@
#define TRKID_MAX 0xffff
+#define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */
+#define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */
+#define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */
/**
* struct input_mt_slot - represents the state of an input MT slot
* @abs: holds current values of ABS_MT axes for this slot
+ * @frame: last frame at which input_mt_report_slot_state() was called
*/
struct input_mt_slot {
int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
+ unsigned int frame;
};
/**
@@ -29,6 +34,7 @@ struct input_mt_slot {
* @num_slots: number of MT slots the device uses
* @slot: MT slot currently being transmitted
* @flags: input_mt operation flags
+ * @frame: increases every time input_mt_sync_frame() is called
* @slots: array of slots holding current values of tracked contacts
*/
struct input_mt {
@@ -36,6 +42,7 @@ struct input_mt {
int num_slots;
int slot;
unsigned int flags;
+ unsigned int frame;
struct input_mt_slot slots[];
};
@@ -81,4 +88,6 @@ void input_mt_report_slot_state(struct input_dev *dev,
void input_mt_report_finger_count(struct input_dev *dev, int count);
void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count);
+void input_mt_sync_frame(struct input_dev *dev);
+
#endif