Skip to content

Commit

Permalink
iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jan Kardell authored and Jonathan Cameron committed Jul 8, 2014
1 parent 2a58b4f commit baa3c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/ti_am335x_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit baa3c65

Please sign in to comment.