[RFC PATCH 2/3] pps: Capture PPS timestamps in multiple clocks
From: Gerik Kubiak
Date: Sat Jun 27 2026 - 16:54:50 EST
Capture the REALTIME, MONOTONIC and BOOTTIME timestamps of all pps
events.
Removes the conditional compilation of ts_raw with the CONFIG_NTP_PPS
option, since now that clock is captured unconditionally.
Signed-off-by: Gerik Kubiak <gerikkub@xxxxxxxxx>
---
include/linux/pps_kernel.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h
index aab0aebb529e..b13cac7fa6b5 100644
--- a/include/linux/pps_kernel.h
+++ b/include/linux/pps_kernel.h
@@ -33,10 +33,9 @@ struct pps_source_info {
};
struct pps_event_time {
-#ifdef CONFIG_NTP_PPS
struct timespec64 ts_raw;
-#endif /* CONFIG_NTP_PPS */
struct timespec64 ts_real;
+ struct timespec64 ts_boot;
};
/* The main struct */
@@ -103,18 +102,16 @@ static inline void pps_get_ts(struct pps_event_time *ts)
ktime_get_snapshot(&snap);
ts->ts_real = ktime_to_timespec64(snap.real);
-#ifdef CONFIG_NTP_PPS
ts->ts_raw = ktime_to_timespec64(snap.raw);
-#endif
+ ts->ts_boot = ktime_to_timespec64(snap.boot);
}
/* Subtract known time delay from PPS event time(s) */
static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta)
{
ts->ts_real = timespec64_sub(ts->ts_real, delta);
-#ifdef CONFIG_NTP_PPS
ts->ts_raw = timespec64_sub(ts->ts_raw, delta);
-#endif
+ ts->ts_boot = timespec64_sub(ts->ts_boot, delta);
}
#endif /* LINUX_PPS_KERNEL_H */
--
2.54.0