Re: [RFC PATCH 4/4] Documentation: iio: Add ADC documentation
From: Marcelo Schmitt
Date: Tue Jan 14 2025 - 08:36:58 EST
On 12/19, Jonathan Cameron wrote:
> On Wed, 18 Dec 2024 14:46:14 -0600
> David Lechner <dlechner@xxxxxxxxxxxx> wrote:
>
> > On 12/18/24 8:38 AM, Marcelo Schmitt wrote:
> > > ADCs can have different input configurations such that developers can get
> > > confused when trying to model some of them into IIO channels.
> > >
...
> > > Add documentation about common ADC characteristics and IIO support for them.
> > >
> > > [1]: https://lore.kernel.org/linux-iio/0fef36f8-a7db-40cc-86bd-9449cb4ab46e@xxxxxxxxx/
> > > [2]: https://www.analog.com/en/resources/technical-articles/sar-adc-input-types.html.
> > >
> > > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> > > ---
> >
...
> > > +1. ADC Channel Types
> > > +====================
> > > +
> > > +ADCs can have distinct types of inputs, each of them measuring analog voltages
> > > +in a slightly different way. An ADC digitizes the analog input voltage over a
> > > +span given by the provided voltage reference, the input type, and the input
> > > +polarity. The input range allowed to an ADC channel is needed to determine the
> > > +scale factor and offset needed to obtain the measured value in real-world
> > > +units (millivolts for voltage measurement, milliamps for current measurement,
> > > +etc.).
>
> Add some 'weasel' words in here. There are more complex non linear ADCs and ones
> only capable of reaching some fraction of the reference voltage.
> Maybe throw in a "generally" somewhere.
V2 will come with a short paragraph with a disclaimer for complex ADCs :)
Thanks,
Marcelo