From: Gerik Kubiak <gerikkub@gmail.com>
To: giometti@enneenne.com
Cc: richardcochran@gmail.com, linux-kernel@vger.kernel.org,
Gerik Kubiak <gerikkub@gmail.com>
Subject: [RFC PATCH 2/3] pps: Capture PPS timestamps in multiple clocks
Date: Sat, 27 Jun 2026 13:50:27 -0700 [thread overview]
Message-ID: <20260627205028.105252-3-gerikkub@gmail.com> (raw)
In-Reply-To: <20260627205028.105252-1-gerikkub@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2026-06-27 20:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 20:50 [RFC PATCH 0/3] PPS Set event clock source Gerik Kubiak
2026-06-27 20:50 ` [RFC PATCH 1/3] pps: Add PPS_SETCLOCK ioctl Gerik Kubiak
2026-06-27 20:50 ` Gerik Kubiak [this message]
2026-06-27 20:50 ` [RFC PATCH 3/3] pps: Timestamp pps events per PPS_SETCLOCK clock Gerik Kubiak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260627205028.105252-3-gerikkub@gmail.com \
--to=gerikkub@gmail.com \
--cc=giometti@enneenne.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.