Commit 376a57d0 authored by Jan Kardell's avatar Jan Kardell Committed by Jiri Slaby

iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends

commit baa3c652 upstream.

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: default avatarJan Kardell <jan.kardell@telliq.com>
Tested-by: default avatarZubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 75c2ca57
......@@ -155,7 +155,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,
if (time_after(jiffies, timeout))
return -EAGAIN;
}
map_val = chan->channel + TOTAL_CHANNELS;
map_val = adc_dev->channel_step[chan->scan_index];
/*
* When the sub-system is first enabled,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment