[PATCH] iio: ad7152: fix channel assignment for AD7153

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>

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 <michael.hennerich@xxxxxxxxxx>
---
 drivers/staging/iio/adc/ad7152.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7152.c b/drivers/staging/iio/adc/ad7152.c
index 42efc37..dac3392 100644
--- a/drivers/staging/iio/adc/ad7152.c
+++ b/drivers/staging/iio/adc/ad7152.c
@@ -440,17 +440,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),
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux