All of lore.kernel.org
 help / color / mirror / Atom feed
* ADC setting for differential and single-ended channels
@ 2013-07-17 14:13 Otavio Salvador
  2013-07-17 19:12 ` Jonathan Cameron
  0 siblings, 1 reply; 16+ messages in thread
From: Otavio Salvador @ 2013-07-17 14:13 UTC (permalink / raw)
  To: linux-iio, Mario Goulart
  Cc: Jonathan Cameron, Lars-Peter Clausen, Marek Vasut

Hello,

Mario and I are working at TI ADS124x driver and this chip can be used
in two ways:

In case of ADS1247:

 - 2 differential channels
 - 3 single-ended channels

In the first case it take two inputs and the chip returns the
difference between them; in the second case it does the same but you
must choose one channel to be the negative reference for all the other
inputs. This is how we understood the datasheet however the
single-ended use is quite confusing on it so we might be wrong.

So we'd like to know the best way to handle those cases in the driver.
One alternative we discussed is to use two attributes in the dts as:

 ...
 #channels = <2>;
 channels = <0 3
                    1 2>;

So it'd take two channels. One composed by input 0 and input 3 and
another composed by input 1 and input 2.

On the another case, we'd use:

  ...
  #channels = <3>
  channels = <0 3
                     1 3
                     2 3>;

So it'd take three channels and all them comparing to input 3.

Are we in the right route? Any hints how to better solve this?

Regards,

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

end of thread, other threads:[~2013-07-18 17:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-17 14:13 ADC setting for differential and single-ended channels Otavio Salvador
2013-07-17 19:12 ` Jonathan Cameron
2013-07-18  1:48   ` Otavio Salvador
2013-07-18  3:31     ` Marek Vasut
2013-07-18  3:38       ` Otavio Salvador
2013-07-18  4:08         ` Marek Vasut
2013-07-18  4:11           ` Marek Vasut
2013-07-18  5:50           ` Lars-Peter Clausen
2013-07-18 12:02             ` Otavio Salvador
2013-07-18 13:54               ` Lars-Peter Clausen
2013-07-18 14:02                 ` Otavio Salvador
2013-07-18 14:59                 ` Mario Domenech Goulart
2013-07-18 17:41                   ` Mario Domenech Goulart
2013-07-18 12:44       ` Mario Domenech Goulart
2013-07-18 13:56         ` Lars-Peter Clausen
2013-07-18 14:06           ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.