summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2018-09-25 00:13:25 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-09-29 12:48:22 +0100
commitbdd4b07ffa5e5d2d577952a559a87498e7bac0da (patch)
treea71894a85a3b005ada7f706bd5e3a5fca8c730b6 /drivers/iio
parentaea835f2dc8a682942b859179c49ad1841a6c8b9 (diff)
iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly
In the future we may support two different channel sets: - one which includes the voltage pads and the temperature sensor output (for Meson8, Meson8b and Meson8m2) - one which only includes the voltage pads (GXBB, GXL, GXM and AXG) Channel 7 has a special function on all of these platforms. However, since we will have different channel array definitions we want our code to always use whatever channels struct iio_dev uses. No functional changes for now. This is the preparation for adding temperature sensor support to this driver. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/meson_saradc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 1c4ba83c0725..809d1230be34 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -854,7 +854,7 @@ static int meson_sar_adc_calib(struct iio_dev *indio_dev)
meson_sar_adc_set_chan7_mux(indio_dev, CHAN7_MUX_VDD_DIV4);
usleep_range(10, 20);
ret = meson_sar_adc_get_sample(indio_dev,
- &meson_sar_adc_iio_channels[7],
+ &indio_dev->channels[7],
MEAN_AVERAGING, EIGHT_SAMPLES, &value0);
if (ret < 0)
goto out;
@@ -862,7 +862,7 @@ static int meson_sar_adc_calib(struct iio_dev *indio_dev)
meson_sar_adc_set_chan7_mux(indio_dev, CHAN7_MUX_VDD_MUL3_DIV4);
usleep_range(10, 20);
ret = meson_sar_adc_get_sample(indio_dev,
- &meson_sar_adc_iio_channels[7],
+ &indio_dev->channels[7],
MEAN_AVERAGING, EIGHT_SAMPLES, &value1);
if (ret < 0)
goto out;