Re: [RFC] How to handle configurable channel specifications

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

 



On Jan 5 2012, Jonathan Cameron wrote:



Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:

On 01/04/2012 10:08 AM, Duss Pirmin wrote:
Hi all

I'm about to write a driver for the ads1242/ads1243 ADC
(http://www.ti.com/lit/ds/symlink/ads1242.pdf).

This chip has 4/8 analog in ports and a common port. In the
configuration of
the chip it is possible to select any of combination of two of this
ports as
source for the analog to digital conversion.
Should there be a channel specification for all of the possible
combinations
or just one, as the chip has only one converter?

Best regards
Pirmin

Hm, so you have 64 virtual differential channels of which only one can
be
active at a time. I think for now it is OK to register all these
channels.
Driver for other devices which are similar in this regard do this as
well.
Yup that is the way to do it.
Actually if you include all the basic modes (handle the two current sources
internally) you'll reach 128 channels.  You could restrict this by not allowing
in_voltage0-voltage0_raw etc (reasonable)
and only one of
in_voltage0-voltage1_raw or in_voltage1-voltage0_raw. (probably not...)

It's probably not worth doing the creation of these algorithmically though.
I'd just go for a big static array of channels (with suitable macros cutting
down the amount of code)



- Lars
--
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


--
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