aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-06-27 04:58:27 -0400
committerJonathan Cameron <jic23@kernel.org>2012-06-30 05:12:30 -0400
commit05eda67d2c31f3e8d815c3fc14f4dbb612363eab (patch)
treec217866fb7b0cd3c49eed2e85a6de91ff54354b2 /drivers/staging/iio
parentce7b04c629254b884baa338730021b01298be921 (diff)
staging:iio:ad7793: Fix scan index for the "shorted" channel
The code expects the scan index to match the offset of the channel into the channel array. For the "shorted" the offset is 3, but the scan index is set to 2. Also the scan index 2 is already taken by the previous channel. As a result the "shorted" channel will appear to be selected if the previous channel is selected and vice versa and it is not possible to sample the "shorted" channel in buffered mode. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/adc/ad7793.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/staging/iio/adc/ad7793.c
index b36556fa295..92d8c255d47 100644
--- a/drivers/staging/iio/adc/ad7793.c
+++ b/drivers/staging/iio/adc/ad7793.c
@@ -786,7 +786,7 @@ static const struct ad7793_chip_info ad7793_chip_info_tbl[] = {
786 .address = AD7793_CH_AIN1M_AIN1M, 786 .address = AD7793_CH_AIN1M_AIN1M,
787 .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | 787 .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
788 IIO_CHAN_INFO_SCALE_SHARED_BIT, 788 IIO_CHAN_INFO_SCALE_SHARED_BIT,
789 .scan_index = 2, 789 .scan_index = 3,
790 .scan_type = IIO_ST('s', 24, 32, 0) 790 .scan_type = IIO_ST('s', 24, 32, 0)
791 }, 791 },
792 .channel[4] = { 792 .channel[4] = {
@@ -859,7 +859,7 @@ static const struct ad7793_chip_info ad7793_chip_info_tbl[] = {
859 .address = AD7793_CH_AIN1M_AIN1M, 859 .address = AD7793_CH_AIN1M_AIN1M,
860 .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | 860 .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
861 IIO_CHAN_INFO_SCALE_SHARED_BIT, 861 IIO_CHAN_INFO_SCALE_SHARED_BIT,
862 .scan_index = 2, 862 .scan_index = 3,
863 .scan_type = IIO_ST('s', 16, 32, 0) 863 .scan_type = IIO_ST('s', 16, 32, 0)
864 }, 864 },
865 .channel[4] = { 865 .channel[4] = {