linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: ti_am335x_adc: Use same step id at FIFOs both ends
@ 2014-06-11 21:18 Jan Kardell
       [not found] ` <53A555A7.7070800@kernel.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kardell @ 2014-06-11 21:18 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Jonathan Cameron, linux-iio, linux-omap

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>
---
 drivers/iio/adc/ti_am335x_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index a4db302..d5dc4c6 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
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-08 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 21:18 [PATCH] iio: ti_am335x_adc: Use same step id at FIFOs both ends Jan Kardell
     [not found] ` <53A555A7.7070800@kernel.org>
2014-06-21 10:26   ` Zubair Lutfullah :
2014-06-23 10:58     ` Jan Kardell
     [not found]       ` <53BAD468.8090908@kernel.org>
2014-07-08 18:53         ` Zubair Lutfullah :

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).