From: Jonathan Cameron <jic23@kernel.org>
To: Sean Nyekjaer <sean@geanix.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ti-ads8688: fix timestamp is not updated in buffer
Date: Sat, 11 May 2019 12:50:44 +0100 [thread overview]
Message-ID: <20190511125044.53f7b574@archlinux> (raw)
In-Reply-To: <20190507082304.11692-2-sean@geanix.com>
On Tue, 7 May 2019 10:23:04 +0200
Sean Nyekjaer <sean@geanix.com> wrote:
> When using the hrtimer iio trigger timestamp isn't updated.
> If we use iio_get_time_ns it is updated correctly.
>
> Fixes: 2a86487786b5c ("iio: adc: ti-ads8688: add trigger and buffer support")
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Ah. I assumed this was the normal, with interrupts it'll update, with hrtimer
it won't - but turns out that in this driver it isn't updated in any path as
the top half that sets pf->timestamp isn't being registered.
Not registering that is correct for a device that doesn't have a dataready interrupt
as we want the timestamp as near to the actual read time as possible.
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ti-ads8688.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c
> index d9c354dbd7e4..304cad3dddc6 100644
> --- a/drivers/iio/adc/ti-ads8688.c
> +++ b/drivers/iio/adc/ti-ads8688.c
> @@ -396,7 +396,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p)
> }
>
> iio_push_to_buffers_with_timestamp(indio_dev, buffer,
> - pf->timestamp);
> + iio_get_time_ns(indio_dev));
>
> iio_trigger_notify_done(indio_dev->trig);
>
next prev parent reply other threads:[~2019-05-11 11:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 8:23 [PATCH 1/2] iio: adc: ti-ads8688: save values correct in buffer Sean Nyekjaer
2019-05-07 8:23 ` [PATCH 2/2] iio: adc: ti-ads8688: fix timestamp is not updated " Sean Nyekjaer
2019-05-11 11:50 ` Jonathan Cameron [this message]
2019-05-11 11:44 ` [PATCH 1/2] iio: adc: ti-ads8688: save values correct " Jonathan Cameron
2019-05-11 12:03 ` Sean Nyekjaer
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=20190511125044.53f7b574@archlinux \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=sean@geanix.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 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.