From 15e3276fd020621236e8443a599b80ae28d6832b Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Fri, 2 Sep 2011 17:25:47 +0100 Subject: [PATCH] staging:iio: ad7152: fix channel assignment for AD7153 In case the AD7153 is selected we need to make sure we provide channel info for the first capacitance input in both single ended and differential configuration. Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/adc/ad7152.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/adc/ad7152.c b/drivers/staging/iio/adc/ad7152.c index 42996b96b850..f980a093882a 100644 --- a/drivers/staging/iio/adc/ad7152.c +++ b/drivers/staging/iio/adc/ad7152.c @@ -441,17 +441,17 @@ static const struct iio_chan_spec ad7152_channels[] = { (1 << IIO_CHAN_INFO_SCALE_SEPARATE), }, { .type = IIO_CAPACITANCE, + .differential = 1, .indexed = 1, - .channel = 1, + .channel = 0, + .channel2 = 2, .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE) | (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) | (1 << IIO_CHAN_INFO_SCALE_SEPARATE), }, { .type = IIO_CAPACITANCE, - .differential = 1, .indexed = 1, - .channel = 0, - .channel2 = 2, + .channel = 1, .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE) | (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) | (1 << IIO_CHAN_INFO_SCALE_SEPARATE), -- 2.34.1