iio: adc: max1027: Introduce an end of conversion helper
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 21 Sep 2021 11:54:04 +0000 (13:54 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:27:33 +0000 (08:27 +0100)
commita0e831653ef93912c442a6d30dcb29fe94ecf050
tree7cad5a9e8120978db0d0465243716cd9375deab8
parentc757fc070886a88ec2ad6bf016b26ec11bfcc5bb
iio: adc: max1027: Introduce an end of conversion helper

For now this helper only waits for the maximum duration of a single
conversion.

In practice, a "temperature measurement" will take twice this
time because it will also carry another analog conversion but as here we
will only care about the temperature conversion which happens first, we
can still only wait for a single sample and get the right data.

This helper will soon be improved to properly handle the end of
conversion interrupt as well as a higher number of samples.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20210921115408.66711-13-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1027.c