aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-02-03 00:19:07 -0800
committerZiyan <jaraidaniel@gmail.com>2016-03-11 16:10:53 +0100
commitd906c8e5788bcd6fd42b22406c92d4554d20a9f6 (patch)
treeb4a2961fb84b06c32084adb4b970f38d5cb87682 /kernel
parent93ef5667e55e7ac3bdf2028c1f5aa4388b015302 (diff)
downloadkernel_samsung_espresso10-d906c8e5788bcd6fd42b22406c92d4554d20a9f6.zip
kernel_samsung_espresso10-d906c8e5788bcd6fd42b22406c92d4554d20a9f6.tar.gz
kernel_samsung_espresso10-d906c8e5788bcd6fd42b22406c92d4554d20a9f6.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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5928f95..4bbb09a 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1207,6 +1207,8 @@ ktime_t ktime_get_monotonic_offset(void)
} while (read_seqretry(&xtime_lock, seq));
return timespec_to_ktime(wtom);
}
+EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset);
+
/**
* xtime_update() - advances the timekeeping infrastructure