The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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 1/3] pps: Add PPS_SETCLOCK ioctl
Date: Sat, 27 Jun 2026 13:50:26 -0700	[thread overview]
Message-ID: <20260627205028.105252-2-gerikkub@gmail.com> (raw)
In-Reply-To: <20260627205028.105252-1-gerikkub@gmail.com>

Add the PPS_SETCLOCK ioctl to the pps driver and an associated
pps_kclock_source structure used as an arugment in the ioctl. This ioctl
allows userspace to specify the clock used in timestamping PPS events.

Adds a pps_kclock_source structure for this ioctl. It contains one value,
clock_id, which holds the requested clock source for subsequent PPS events.

Signed-off-by: Gerik Kubiak <gerikkub@gmail.com>
---
 include/uapi/linux/pps.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h
index 009ebcd8ced5..db233511c6ef 100644
--- a/include/uapi/linux/pps.h
+++ b/include/uapi/linux/pps.h
@@ -87,6 +87,10 @@ struct pps_kparams {
 	struct pps_ktime clear_off_tu;	/* offset compensation for clear */
 };
 
+struct pps_kclock_source {
+	__u32 clock_id;  /* System clock id */
+};
+
 /*
  * 3.3 Mode bit definitions
  */
@@ -140,6 +144,7 @@ struct pps_bind_args {
 	int consumer;	/* selected kernel consumer */
 };
 
+
 #include <linux/ioctl.h>
 
 #define PPS_GETPARAMS		_IOR('p', 0xa1, struct pps_kparams *)
@@ -147,5 +152,6 @@ struct pps_bind_args {
 #define PPS_GETCAP		_IOR('p', 0xa3, int *)
 #define PPS_FETCH		_IOWR('p', 0xa4, struct pps_fdata *)
 #define PPS_KC_BIND		_IOW('p', 0xa5, struct pps_bind_args *)
+#define PPS_SETCLOCK		_IOW('p', 0xa6, struct pps_clock_source *)
 
 #endif /* _PPS_H_ */
-- 
2.54.0


  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 ` Gerik Kubiak [this message]
2026-06-27 20:50 ` [RFC PATCH 2/3] pps: Capture PPS timestamps in multiple clocks Gerik Kubiak
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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox