iio: proximity: as3935: set up buffer timestamps for non-zero values
authorAlison Schofield <amsfield22@gmail.com>
Mon, 11 Jul 2016 15:26:56 +0000 (08:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:37 +0000 (10:07 +0200)
commit f8adf645db03345af2d9a8b6095b02327ea50885 upstream.

Use the iio_pollfunc_store_time parameter during triggered buffer
set-up to get valid timestamps.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/proximity/as3935.c

index e2f926cdcad2acdbdd8aec50f0f479f52d2a6584..a0aedda7dfd769202c3782e2b6c1a854b3abba13 100644 (file)
@@ -392,7 +392,7 @@ static int as3935_probe(struct spi_device *spi)
                return ret;
        }
 
-       ret = iio_triggered_buffer_setup(indio_dev, NULL,
+       ret = iio_triggered_buffer_setup(indio_dev, iio_pollfunc_store_time,
                &as3935_trigger_handler, NULL);
 
        if (ret) {