greybus: timesync: Add debugfs entry to display frame-ping in ktime
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Sun, 5 Jun 2016 13:03:30 +0000 (14:03 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 7 Jun 2016 03:50:08 +0000 (20:50 -0700)
commit423042f4b2dc763f16c27b18a19611fa1773ac30
tree4b7fc8bc220e0629c85ad832df1e1e5dd1edf54d
parent00fdbae1a9d2cecfcbab98fe69e4483f80fb80c4
greybus: timesync: Add debugfs entry to display frame-ping in ktime

This patch makes a debugfs entry in
/sys/kernel/debug/greybus/X-svc/frame-ktime that generates a TimeSync ping
event to the system and then subsequently presents that data to user-space
as a ktime/timespec clock-monotonic value rather than as a raw frame-time,
to aid humans in debugging and understanding frame-time and to provide an
example of the converting a frame-time to timespec/ktime to other
developers.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/timesync.c