All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Eli Gavril <eli.gavril@gmail.com>
Cc: Dipen Patel <dipenp@nvidia.com>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	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: Re: [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra
Date: Wed, 2 Dec 2026 14:48:01 +0800	[thread overview]
Message-ID: <20261202064801.GA25224@rigel> (raw)
In-Reply-To: <20261130142435.1292201-1-eli.gavril@gmail.com>

On Mon, Nov 30, 2026 at 04:24:32PM +0200, Eli Gavril wrote:
> HTE supports the NVIDIA Tegra Generic Timestamping Engine (GTE), but
> only in the GTE's own counter time, not in CLOCK_REALTIME, so it cannot
> be used as is to timestamp a GNSS PPS. NVIDIA instead uses its
> out-of-tree nvpps driver [1], which reads the GTE through HTE but
> reports through its own character device rather than the GPIO API. This
> series adds CLOCK_REALTIME timestamps to HTE and the GPIO API.
> 
> Patch 1 adds a CLOCK_REALTIME-correlated time to struct hte_ts_data,
> patch 2 fills it in the Tegra194 GTE driver, and patch 3 returns it when
> user space requests HTE and REALTIME together, which is rejected today.
> If a separate flag is preferred over combining the two, I can change it.
> 

Using a combination of the two flags seems appropriate.  A separate flag
would be more confusing.

A couple of nits:

I would prefer if the HTE consumer (gpiolib-cdev here) could confirm that
the HTE provider supports realtime so a request would return EOPNOTSUPP
if not, rather than using time 0 in edge events for that purpose.

Similarly, it would be preferable for the HTE provider to only populate
realtime_ns when requested by the consumer, so as not to waste time for
consumers that do not require it.

Both of those could be achieved by adding a capability request mechanism
to the HTE API.

Cheers,
Kent.

      parent reply	other threads:[~2026-12-02  6:48 UTC|newest]

Thread overview: 7+ 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 ` [PATCH 1/3] hte: add CLOCK_REALTIME-correlated timestamp to hte_ts_data Eli Gavril
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
2026-12-01 18:59 ` [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra Linus Walleij
2026-12-01 19:17 ` Dipen Patel
2026-12-02  6:48 ` Kent Gibson [this message]

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=20261202064801.GA25224@rigel \
    --to=warthog618@gmail.com \
    --cc=brgl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dipenp@nvidia.com \
    --cc=eli.gavril@gmail.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 \
    /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.