[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1415199681.3660.8.camel@mm-sol.com>
Date: Wed, 05 Nov 2014 17:01:21 +0200
From: "Ivan T. Ivanov" <iivanov@...sol.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Stanimir Varbanov <svarbanov@...sol.com>,
Angelo Compagnucci <angelo.compagnucci@...il.com>,
Grant Likely <grant.likely@...aro.org>,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v4 2/2] iio: vadc: Qualcomm SPMI PMIC voltage ADC driver
On Wed, 2014-11-05 at 14:06 +0000, Jonathan Cameron wrote:
> On 05/11/14 13:57, Ivan T. Ivanov wrote:
> > On Wed, 2014-11-05 at 13:09 +0000, Jonathan Cameron wrote:
> > > On 03/11/14 15:24, Ivan T. Ivanov wrote:
> > > > From: Stanimir Varbanov <svarbanov@...sol.com>
> > > >
> > > > The voltage ADC is peripheral of Qualcomm SPMI PMIC chips. It has
> > > > 15 bits resolution and register space inside PMIC accessible across
> > > > SPMI bus.
> > > >
> > > > The vadc driver registers itself through IIO interface.
> > > >
> > > > Signed-off-by: Stanimir Varbanov <svarbanov@...sol.com>
> > > > Signed-off-by: Ivan T. Ivanov <iivanov@...sol.com>
> > > Hi Ivan,
> > >
> > > Couple of utterly tiny bits inline. The biggest one is that
> > > you store some info about the calibration that you never actually
> > > use... Left over from some debugging perhaps?
> > >
> > > Jonathan
> >
> > <snip>
> >
> > > > +
> > > > +/*
> > > > + * VADC_CALIB_ABSOLUTE: uses the 625mV and 1.25V as reference channels.
> > > > + * VADC_CALIB_RATIOMETRIC: uses the reference voltage (1.8V) and GND for
> > > > + * calibration.
> > > > + */
> > > > +enum vadc_calibration {
> > > > + VADC_CALIB_ABSOLUTE = 0,
> > > > + VADC_CALIB_RATIOMETRIC
> > > > +};
> > > > +
> > > > +/**
> > > > + * struct vadc_linear_graph - Represent ADC characteristics.
> > > > + * @dy: numerator slope to calculate the gain.
> > > As dy is always equal to vref-gnd you could drop it and use those
> > > directly...
> > >
> > > Conversly you store vref or grnd and never use them...
> >
> > I am not sure I am following you. Please take a look in
> > vadc_measure_ref_points() and vadc_calibrate().
> Good point on grnd, but vref is set but never read anywhere that I can find..
>
Right. At this point it is not used. Driver right now provide basic per
channel voltage measurements. The plan is to add temperature compensation for the
measurements and additional scaling functions which are specific per channel.
I could drop this field from initial driver version if you like.
Regards,
Ivan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists