diff options
author | Jan Kardell <jan.kardell@telliq.com> | 2014-11-06 22:18:00 +0000 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-07-18 15:51:14 +0200 |
commit | 376a57d00313c93db09e2ba2fdb7eb8c97b6bb65 (patch) | |
tree | 9ac2257ba109f210e526280ad2395adfe86f43ae /drivers/iio | |
parent | 75c2ca57d23d993553e878a2186493d975894d18 (diff) | |
download | lwn-376a57d00313c93db09e2ba2fdb7eb8c97b6bb65.tar.gz lwn-376a57d00313c93db09e2ba2fdb7eb8c97b6bb65.zip |
iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
commit baa3c65298c089a9014b4e523a14ec2885cca1bc 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: Jan Kardell <jan.kardell@telliq.com>
Tested-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/iio')
-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 a952538a1a8b..b9ed661293a7 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -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, |