diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-20 16:39:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-20 16:39:59 -0400 |
commit | b85c715c2e6fabdd18c90df878ed2c6e6cd50fc2 (patch) | |
tree | 41f8cc32c03500c499e35e641f08f41a41f28ece /include/linux/pps_kernel.h | |
parent | aee77e4accbeb2c86b1d294cd84fec4a12dde3bd (diff) | |
parent | 450783747f42dfa3883920acfad4acdd93ce69af (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next
Ben Hutchings says:
====================
1. Extension to PPS/PTP to allow for PHC devices where pulses are
subject to a variable but measurable delay.
2. PPS/PTP/PHC support for Solarflare boards with a timestamping
peripheral.
3. MTD support for updating the timestamping peripheral on those boards.
4. Fix for potential over-length requests to firmware.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pps_kernel.h')
-rw-r--r-- | include/linux/pps_kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h index 94048547f29..0cc45ae1afd 100644 --- a/include/linux/pps_kernel.h +++ b/include/linux/pps_kernel.h @@ -116,5 +116,14 @@ static inline void pps_get_ts(struct pps_event_time *ts) #endif /* CONFIG_NTP_PPS */ +/* Subtract known time delay from PPS event time(s) */ +static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec delta) +{ + ts->ts_real = timespec_sub(ts->ts_real, delta); +#ifdef CONFIG_NTP_PPS + ts->ts_raw = timespec_sub(ts->ts_raw, delta); +#endif +} + #endif /* LINUX_PPS_KERNEL_H */ |