linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Gregor Boirie <gregor.boirie@parrot.com>
Cc: "Bartosz Gołaszewski" <bartekgola@gmail.com>,
	linux-iio@vger.kernel.org, "Jonathan Cameron" <jic23@kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org, "Lars-Peter Clausen" <lars@metafoo.de>,
	linux-gpio@vger.kernel.org
Subject: Re: [RFC] Periodic Output, Timestamped Input
Date: Tue, 05 Dec 2017 13:23:56 +0200	[thread overview]
Message-ID: <87vahls9ir.fsf@linux.intel.com> (raw)
In-Reply-To: <CACRpkdbSPqnOjnmCd6-0FZznw+ojzA87Qmv9n5qxAwFHnHLUOw@mail.gmail.com>

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


Hi,

Linus Walleij <linus.walleij@linaro.org> writes:
> On Tue, Dec 5, 2017 at 10:20 AM, Felipe Balbi
> <felipe.balbi@linux.intel.com> wrote:
>> [Me]:
>
>>> I was thinking about it already when implementing it but it fell
>>> out of my mind. I'm putting in on my TODO. (CC to bartosz
>>> who might be interested, he's using these ABIs quite a bit.)
>>
>> fair enough. In that case, it'll probably be easier to implement
>> HW-based timestamping with something like below:
>
> Indeed.
>
> IIO has a per-device sysfs file for setting up
> the POSIX timestamping named current_timestamp_clock.
> This was added by Gregor Boire in commit
> bc2b7dab629a
>
> The supported timestamps are:
> realtime
> monotonic
> monotonic_raw
> realtime_coarse
> monotonic_coarse
> boottime
> tai
>
> I could really need some help here... :/
>
> It feels like "monotonic" could very well be what you're
> looking for but I don't know the POSIX definition of these.
> Maybe we need to add one more for "device specific"?
>
> What I want to do is factor most of that commit out into
> lib/ and reuse for timestamping in GPIO so we can
> have coherent timestamps across GPIO and IIO.
>
> OK OK O need to get to it and stop talking...
>
> I guess it should be set per-gpiochip rather than
> per-gpio-desc though, but that makes most sense anyways.

Well, it may be that not every pin on a gpiochip supports HW-backed
timestamping. Just speculating here, that's why I made it per-gpio_desc
on the example.

-- 
balbi

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

      reply	other threads:[~2017-12-05 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16  9:29 [RFC] Periodic Output, Timestamped Input Felipe Balbi
2017-11-29 13:31 ` Linus Walleij
2017-11-29 13:56   ` Felipe Balbi
2017-11-29 22:54     ` Linus Walleij
2017-12-02 13:34       ` Jonathan Cameron
2017-12-05  9:20       ` Felipe Balbi
2017-12-05 11:01         ` Linus Walleij
2017-12-05 11:23           ` Felipe Balbi [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=87vahls9ir.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=bartekgola@gmail.com \
    --cc=gregor.boirie@parrot.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@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).