]> git.baikalelectronics.ru Git - kernel.git/commit
iio:bmi160: use iio_pollfunc_store_time
authorMartin Kelly <martin@martingkelly.com>
Sat, 2 Feb 2019 21:56:00 +0000 (13:56 -0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 9 Feb 2019 15:24:27 +0000 (15:24 +0000)
commit2b219c5dee69c113418ee1c38d70eeab11970abd
tree2070a154e04ab6377050df1b6e172522589c0588
parentb21a67178940ce6c4384e1de14319a95fdec6e42
iio:bmi160: use iio_pollfunc_store_time

Currently, we snap the timestamp after reading from the buffer and
processing the event. When the IIO poll function is triggered by an
interrupt,  we can get a slightly more accurate timestamp by snapping it
prior to reading the data, since the data was already generated prior to
entering the trigger handler. This is not going to make a huge difference,
but we might as well improve slightly.

Do this by using iio_pollfunc_store_time as other drivers do.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bmi160/bmi160_core.c