From: Eli Gavril <eli.gavril@gmail.com>
To: Dipen Patel <dipenp@nvidia.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>
Cc: Kent Gibson <warthog618@gmail.com>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
timestamp@lists.linux.dev, linux-gpio@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-doc@vger.kernel.org,
linux-api@vger.kernel.org
Subject: [PATCH 1/3] hte: add CLOCK_REALTIME-correlated timestamp to hte_ts_data
Date: Mon, 30 Nov 2026 16:24:33 +0200 [thread overview]
Message-ID: <20261130142435.1292201-2-eli.gavril@gmail.com> (raw)
In-Reply-To: <20261130142435.1292201-1-eli.gavril@gmail.com>
HTE providers report timestamps in their own counter's epoch, which
consumers cannot convert to wall-clock time. Add an optional
realtime_ns field for the timestamp correlated to CLOCK_REALTIME;
providers that cannot provide it leave it 0.
struct hte_ts_data is allocated and used only inside the kernel, so
the user-space ABI does not change.
Signed-off-by: Eli Gavril <eli.gavril@gmail.com>
---
include/linux/hte.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/hte.h b/include/linux/hte.h
index 8289055061ab..076ad0a4ba84 100644
--- a/include/linux/hte.h
+++ b/include/linux/hte.h
@@ -44,11 +44,14 @@ enum hte_return {
* @seq: Sequence counter of the timestamps.
* @raw_level: Level of the line at the timestamp if provider supports it,
* -1 otherwise.
+ * @realtime_ns: Event time correlated to CLOCK_REALTIME in nanoseconds if the
+ * provider supports it, 0 otherwise.
*/
struct hte_ts_data {
u64 tsc;
u64 seq;
int raw_level;
+ u64 realtime_ns;
};
/**
--
2.43.0
next prev parent reply other threads:[~2026-11-30 14:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:24 [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra Eli Gavril
2026-11-30 14:24 ` Eli Gavril [this message]
2026-11-30 14:24 ` [PATCH 2/3] hte: tegra194: correlate captured timestamps to CLOCK_REALTIME Eli Gavril
2026-11-30 14:24 ` [PATCH 3/3] gpiolib: cdev: report HTE timestamps in the CLOCK_REALTIME domain Eli Gavril
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=20261130142435.1292201-2-eli.gavril@gmail.com \
--to=eli.gavril@gmail.com \
--cc=brgl@kernel.org \
--cc=corbet@lwn.net \
--cc=dipenp@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linusw@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=thierry.reding@kernel.org \
--cc=timestamp@lists.linux.dev \
--cc=warthog618@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