linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jack Winch <sunt.un.morcov@gmail.com>
To: Kent Gibson <warthog618@gmail.com>
Cc: linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com
Subject: Re: Suggestion - Configurable Source Clock Type for Line Event Timestamping
Date: Mon, 12 Oct 2020 08:23:09 +0100	[thread overview]
Message-ID: <CAFhCfDZ1uuvq6eBiXXcFndMJnWEwSTsEPS9v7vnXfdkgutmFAQ@mail.gmail.com> (raw)
In-Reply-To: <20201012050631.GA14076@sol>

Hi Kent,

Thanks for the quick response. It was originally my intention to CC
the pair of you on my original email, but I wasn't sure if it was 'the
done thing'.

For most of the users I previously referred to, minimum timestamping
latency (using the realtime clock as the source) is crucial. A
userspace solution might be suitable for the others, but for these
wall clock time sensitive applications the acquisition of a timestamp
value from the system realtime clock is required within the interrupt
handling code.

For context, these wall clock time sensitive users are running on
systems which are PTPv2 clients, with their system realtime clock
synchronised to that of a local PTP Grand Master clock.  In the past,
I have used the TTL Pulse Per Second (PPS) output of the Grand Master
to evaluate methods of timestamping line events with wall clock time
and it was the kernel timestamping which was most suitable for our
application.

Another way to skin the cat could be to create separate kernel modules
for these applications, with them acting as a consumer to the GPIO
subsystem.  That way, interrupts could be setup and handled for line
events, with these application specific kernel modules undertaking the
timestamping using the realtime system clock within the module ISRs.
But that would have to be assessed.

I still believe adding this functionality to the chardev would be
beneficial for users, although I understand your preference for other
solutions first.

Regarding the extending of the flags field, you're absolutely right.
One thing I'd have to go over is how changes to the use of that flag
field could effect other parts of the subsystem.  I would expect that
this change will only be utilised by the chardev in the first instance
however.

I also have a couple of other queries regarding the current and future
state of libgpiod, but I will submit those via a separate thread of
discussion in order to keep each discussion appropriately partitioned.

Thanks,
Jack

  reply	other threads:[~2020-10-12  8:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 14:15 Suggestion - Configurable Source Clock Type for Line Event Timestamping Jack Winch
2020-10-12  5:06 ` Kent Gibson
2020-10-12  7:23   ` Jack Winch [this message]
2020-10-12  9:14     ` Kent Gibson
2020-10-12 10:21 ` Bartosz Golaszewski
2020-10-12 10:05   ` Jack Winch
2020-10-12 13:39     ` Bartosz Golaszewski
2020-10-12 14:21       ` Kent Gibson
2020-10-12 14:25         ` Bartosz Golaszewski
2020-10-13  8:42 ` Linus Walleij
2020-10-14 11:07   ` Jack Winch

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=CAFhCfDZ1uuvq6eBiXXcFndMJnWEwSTsEPS9v7vnXfdkgutmFAQ@mail.gmail.com \
    --to=sunt.un.morcov@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-gpio@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).