From: David Lechner <dlechner@baylibre.com>
To: "Gyeyoung Baek" <gye976@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/9] iio: Introduce new timestamp grabbing APIs
Date: Mon, 19 May 2025 10:28:21 -0500 [thread overview]
Message-ID: <f06d231d-297f-4c83-b457-b9eb242b9c93@baylibre.com> (raw)
In-Reply-To: <20250519-timestamp-v1-0-fcb4f6c2721c@gmail.com>
On 5/19/25 9:25 AM, Gyeyoung Baek wrote:
> Support automatic timestamp grabbing by passing `true` to the `timestamp_enabled` parameter of `iio_triggered_buffer_setup_new()`.
> So consumer drivers don't need to set `iio_pollfunc_store_time()` as either the tophalf or bottomhalf manually.
>
> For this, triggers must indicate whether they will call `poll()`, `poll_nested()`, or both before
> calling `iio_trigger_register()`. This is necessary because the consumer's handler does not know
> in advance which trigger will be attached.
>
> Once `iio_trigger_attach_poll_func()` is called, a timestamp is grabbed in either the
> tophalf or bottomhalf based on the trigger's type (POLL or POLL_NESTED). If the trigger
> supports both (e.g., at91-sama5d2-adc.c), it is treated as POLL_NESTED since the consumer's
> tophalf is not invoked in poll_nested(), but the bottomhalf always is.
>
> If the attached trigger supports timestamp grabbing itself, the consumer does not need to handle it.
> Instead, the consumer's `poll_func` pointer is passed to the trigger, which can then store the
> timestamp directly into consumer. Trigger drivers can pass timestamp values to consumers in a consistent
> interface using the new API `iio_trigger_store_time()`.
This is explaining what it does and how it works, but we really want to
know first _why_ we need this and why it is better that what we already
have or what sort of problem this is fixing that the current situation
can't handle.
next prev parent reply other threads:[~2025-05-19 15:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 14:25 Gyeyoung Baek
2025-05-19 14:25 ` [PATCH RFC 1/9] iio: buffer: Fix checkpatch.pl warning Gyeyoung Baek
2025-05-25 17:35 ` Jonathan Cameron
2025-05-26 5:30 ` Gyeyoung Baek
2025-05-26 17:15 ` Jonathan Cameron
2025-05-19 14:25 ` [PATCH RFC 2/9] iio: consumer: Define timestamp-related structures and constants Gyeyoung Baek
2025-05-31 18:01 ` Jonathan Cameron
2025-05-19 14:25 ` [PATCH RFC 3/9] iio: consumer: Add new APIs of triggered_buffer_setup() family Gyeyoung Baek
2025-05-31 18:16 ` Jonathan Cameron
2025-05-19 14:25 ` [PATCH RFC 4/9] iio: consumer: Add new API iio_poll_func_register() Gyeyoung Baek
2025-05-19 14:25 ` [PATCH RFC 5/9] iio: consumer: Add new API iio_pollfunc_get_timestamp() Gyeyoung Baek
2025-05-19 14:25 ` [PATCH RFC 6/9] iio: trigger: Define timetamp-related structures and constants Gyeyoung Baek
2025-05-31 18:09 ` Jonathan Cameron
2025-05-19 14:25 ` [PATCH RFC 7/9] iio: trigger: Add new API iio_trigger_attach_timestamp() Gyeyoung Baek
2025-05-19 14:26 ` [PATCH RFC 8/9] iio: trigger: Add new API iio_trigger_store_time() Gyeyoung Baek
2025-05-19 14:26 ` [PATCH RFC 9/9] iio: rpr0521: Use new timestamp-related APIs Gyeyoung Baek
2025-05-31 18:14 ` Jonathan Cameron
2025-06-06 10:20 ` Gyeyoung Baek
2025-05-19 15:28 ` David Lechner [this message]
2025-05-19 18:24 ` [PATCH RFC 0/9] iio: Introduce new timestamp grabbing APIs Gyeyoung Baek
2025-05-31 18:10 ` Jonathan Cameron
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=f06d231d-297f-4c83-b457-b9eb242b9c93@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=gye976@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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
all inboxes | Powered by JetHome®