Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c3a7b0a authored by Stefan Brüns's avatar Stefan Brüns Committed by Greg Kroah-Hartman
Browse files

iio: adc: ina2xx: Align timestamp with conversion ready flag



As the timestamp is no longer (ab-)used to measure the function run time,
it can be taken at the correct time, i.e. when the conversion has finished.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ea2a638
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -708,8 +708,6 @@ static int ina2xx_work_buffer(struct iio_dev *indio_dev)
	s64 time;
	unsigned int alert;

	time = iio_get_time_ns(indio_dev);

	/*
	 * Because the timer thread and the chip conversion clock
	 * are asynchronous, the period difference will eventually
@@ -738,6 +736,8 @@ static int ina2xx_work_buffer(struct iio_dev *indio_dev)

		} while (!alert);

	time = iio_get_time_ns(indio_dev);

	/*
	 * Single register reads: bulk_read will not work with ina226/219
	 * as there is no auto-increment of the register pointer.