public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Holger Assmann <h.assmann@pengutronix.de>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-iio@vger.kernel.org
Subject: Re: Counter device Interface for reading out input capture
Date: Tue, 17 Nov 2020 07:25:41 -0500	[thread overview]
Message-ID: <X7PBRc1e/TbOPYmT@shinobu> (raw)
In-Reply-To: <0fa25b7a-92f9-8eb7-088e-2ef3a2edf2a0@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

On Tue, Nov 17, 2020 at 11:54:17AM +0100, Ahmad Fatoum wrote:
> Hello William,
> 
> On 06.11.20 13:42, William Breathitt Gray wrote:
> > On Thu, Nov 05, 2020 at 07:46:14PM +0100, Ahmad Fatoum wrote:
> >> It doesn't look like the counter device API is yet made to support such
> >> an input capture mode (latching a counter value on an external event, e.g.
> >> to timestamp incoming rising edges to measure jitter between pulses).
> >
> > Regarding the Counter subsystem, I'm developing a Counter character
> > device API that supports timestamps for counter devices:
> > https://lore.kernel.org/linux-arm-kernel/157d1edf-feec-33b5-7ad5-94f99316ca6e@lechnology.com/T/
> 
> Any chance we could have a "raw" timestamp as well like the network
> stack offers (cf. SOF_TIMESTAMPING_{RAW,SYS}_HARDWARE)?
> 
> The API currently only exposes a ktime (i.e. CLOCK_MONOTONIC), which the
> raw timer count can't be readily converted to. For our use case of
> measuring jitter, the raw value is sufficient.

Sure, we can add support for a "raw" timestamp. I can see how this could
be more useful in certain circumstances rather than the ktime value.
I'll open a discussion about it when I submit the next revision of the
Counter character device patchset. :-)

William Breathitt Gray

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-11-17 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 18:46 Counter device Interface for reading out input capture Ahmad Fatoum
2020-11-06  9:11 ` Fabrice Gasnier
2020-11-06 17:16   ` Holger Assmann
2020-11-06 12:42 ` William Breathitt Gray
2020-11-17 10:54   ` Ahmad Fatoum
2020-11-17 12:25     ` William Breathitt Gray [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=X7PBRc1e/TbOPYmT@shinobu \
    --to=vilhelm.gray@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=h.assmann@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.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