Re: ADC setting for differential and single-ended channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 17, 2013 at 4:12 PM, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
>
> Otavio Salvador <otavio@xxxxxxxxxxxxxxxx> wrote:
>>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?
>
> Another option is to leave it entirely up to user space.  See max1363 driver where both single ended and differential channels are supported at the same time with care taken in buffered mode.
>
> Not sure if that works for your case?

I think it is nicer to have it set in the dt; we need the dt anyway so
it seems logical to get it setting  the right channel.

--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux