diff options
author | Jan Kardell <jan.kardell@telliq.com> | 2014-11-06 22:18:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-07-08 21:21:22 +0100 |
commit | baa3c65298c089a9014b4e523a14ec2885cca1bc (patch) | |
tree | 2d185ea2ee2aec823ff1ea516d3e086aa9799cb5 /drivers | |
parent | 2a58b4f88e3e51619916e9d090cbd1bb8d12b632 (diff) | |
download | linux-baa3c65298c089a9014b4e523a14ec2885cca1bc.tar.gz linux-baa3c65298c089a9014b4e523a14ec2885cca1bc.tar.bz2 linux-baa3c65298c089a9014b4e523a14ec2885cca1bc.zip |
iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
Since AI lines could be selected at will (linux-3.11) the sending
and receiving ends of the FIFO does not agree about what step is used
for a line. It only works if the last lines are used, like 5,6,7,
and fails if ie 2,4,6 is selected in DT.
Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
Tested-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index a4db3026bec6..d5dc4c6ce86c 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -374,7 +374,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, return -EAGAIN; } } - map_val = chan->channel + TOTAL_CHANNELS; + map_val = adc_dev->channel_step[chan->scan_index]; /* * We check the complete FIFO. We programmed just one entry but in case |