[PATCH] iio: accel: bma180: Set up buffer timestamps for non-zero values
From: simran singhal
Date: Wed Mar 29 2017 - 10:11:53 EST
Use the iio_pollfunc_store_time parameter during triggered buffer set-up
to get valid timestamps.
Signed-off-by: simran singhal <singhalsimran0@xxxxxxxxx>
---
drivers/iio/accel/bma180.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index efc6773..4ae5c80 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -762,7 +762,7 @@ static int bma180_probe(struct i2c_client *client,
goto err_trigger_free;
}
- ret = iio_triggered_buffer_setup(indio_dev, NULL,
+ ret = iio_triggered_buffer_setup(indio_dev, iio_pollfunc_store_time,
bma180_trigger_handler, NULL);
if (ret < 0) {
dev_err(&client->dev, "unable to setup iio triggered buffer\n");
--
2.7.4