summaryrefslogtreecommitdiff
path: root/include/linux/ptp_clock_kernel.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-09-03 14:34:58 +0400
committerBen Hutchings <bhutchings@solarflare.com>2012-09-08 00:13:28 +0400
commit220a60a425146b0e37998cc0b3082f0541aad866 (patch)
tree44e48c4489f8e354d17269d41db19d015d9b95fe /include/linux/ptp_clock_kernel.h
parentef2c7d7b59708d54213c7556a82d14de9a7e4475 (diff)
downloadlinux-220a60a425146b0e37998cc0b3082f0541aad866.tar.xz
pps/ptp: Allow PHC devices to adjust PPS events for known delay
Initial version by Stuart Hodgson <smhodgson@solarflare.com> Some PHC device drivers may deliver PPS events with a significant and variable delay, but still be able to measure precisely what that delay is. Add a pps_sub_ts() function for subtracting a delay from the timestamp(s) in a PPS event, and a PTP event type (PTP_CLOCK_PPSUSR) for which the caller provides a complete PPS event. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
-rw-r--r--include/linux/ptp_clock_kernel.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
index 945704c2ed65..a644b29f1161 100644
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -21,6 +21,7 @@
#ifndef _PTP_CLOCK_KERNEL_H_
#define _PTP_CLOCK_KERNEL_H_
+#include <linux/pps_kernel.h>
#include <linux/ptp_clock.h>
@@ -110,6 +111,7 @@ enum ptp_clock_events {
PTP_CLOCK_ALARM,
PTP_CLOCK_EXTTS,
PTP_CLOCK_PPS,
+ PTP_CLOCK_PPSUSR,
};
/**
@@ -117,13 +119,17 @@ enum ptp_clock_events {
*
* @type: One of the ptp_clock_events enumeration values.
* @index: Identifies the source of the event.
- * @timestamp: When the event occured.
+ * @timestamp: When the event occurred (%PTP_CLOCK_EXTTS only).
+ * @pps_times: When the event occurred (%PTP_CLOCK_PPSUSR only).
*/
struct ptp_clock_event {
int type;
int index;
- u64 timestamp;
+ union {
+ u64 timestamp;
+ struct pps_event_time pps_times;
+ };
};
/**