aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-02-03 00:19:07 -0800
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 01:51:05 +0100
commit2b47842438d0d84c1f06be2c0c227048ca8e6e5d (patch)
tree7a403136cb1624400e308a45564c5b7e514d1771 /include
parente8d223bdbb059fd8850c220e984501d4628f57d3 (diff)
downloadkernel_samsung_smdk4412-2b47842438d0d84c1f06be2c0c227048ca8e6e5d.zip
kernel_samsung_smdk4412-2b47842438d0d84c1f06be2c0c227048ca8e6e5d.tar.gz
kernel_samsung_smdk4412-2b47842438d0d84c1f06be2c0c227048ca8e6e5d.tar.bz2
Input: add infrastructure for selecting clockid for event time stamps
As noted by Arve and others, since wall time can jump backwards, it is difficult to use for input because one cannot determine if one event occurred before another or for how long a key was pressed. However, the timestamp field is part of the kernel ABI, and cannot be changed without possibly breaking existing users. This patch adds a new IOCTL that allows a clockid to be set in the evdev_client struct that will specify which time base to use for event timestamps (ie: CLOCK_MONOTONIC instead of CLOCK_REALTIME). For now we only support CLOCK_MONOTONIC and CLOCK_REALTIME, but in the future we could support other clockids if appropriate. The default remains CLOCK_REALTIME, so we don't change the ABI. Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Daniel Kurtz <djkurtz@google.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Conflicts: include/linux/input.h Change-Id: I7b9b442dcd7930a1e72c688327e6fb7275107128
Diffstat (limited to 'include')
-rw-r--r--include/linux/input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 5694583..af73bfd 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -132,6 +132,8 @@ struct input_keymap_entry {
#define EVIOCGSUSPENDBLOCK _IOR('E', 0x91, int) /* get suspend block enable */
#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int) /* set suspend block enable */
+#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
+
/*
* Device properties and quirks
*/