lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1541695681.2091.10.camel@analog.com>
Date:   Thu, 8 Nov 2018 16:48:02 +0000
From:   "Popa, Stefan Serban" <StefanSerban.Popa@...log.com>
To:     "jic23@...nel.org" <jic23@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
CC:     "knaack.h@....de" <knaack.h@....de>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "pmeerw@...erw.net" <pmeerw@...erw.net>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/3] iio: adc: Add ad7124 support

On Jo, 2018-11-08 at 10:34 -0600, Rob Herring wrote:
> On Thu, Nov 8, 2018 at 9:02 AM Popa, Stefan Serban
> <StefanSerban.Popa@...log.com> wrote:
> > 
> > 
> > On Sb, 2018-11-03 at 12:16 +0000, Jonathan Cameron wrote:
> > > 
> > > On Mon, 29 Oct 2018 18:38:31 +0200
> > > Stefan Popa <stefan.popa@...log.com> wrote:
> > > 
> > > > 
> > > > 
> > > > The ad7124-4 and ad7124-8 are a family of 4 and 8 channel sigma-
> > > > delta
> > > > ADCs
> > > > with 24-bit precision and reference.
> > > > 
> > > > Three power modes are available which in turn affect the output
> > > > data
> > > > rate:
> > > >  * Full power: 9.38 SPS to 19,200 SPS
> > > >  * Mid power: 2.34 SPS to 4800 SPS
> > > >  * Low power: 1.17 SPS to 2400 SPS
> > > > 
> > > > The ad7124-4 can be configured to have four differential inputs,
> > > > while
> > > > ad7124-8 can have 8. Moreover, ad7124 also supports per channel
> > > > configuration. Each configuration consists of gain, reference
> > > > source,
> > > > output data rate and bipolar/unipolar configuration.
> > > > 
> > > > Datasheets:
> > > > Link: http://www.analog.com/media/en/technical-documentation/data-s
> > > > heet
> > > > s/AD7124-4.pdf
> > > > Link: http://www.analog.com/media/en/technical-documentation/data-s
> > > > heet
> > > > s/ad7124-8.pdf
> > > > 
> > > > Signed-off-by: Stefan Popa <stefan.popa@...log.com>
> > > Hi Stefan,
> > > 
> > > The discussion around the DT binding has gotten me looking at bit
> > > more closely at that for this version.
> > > 
> > > Some most comments in that section.  Also a really minor ordering
> > > issue
> > > in
> > > remove which I'd just have fixed if we weren't going around again for
> > > the binding.
> > > 
> > > Main binding thing is I don't think the odr value belongs in DT.
> > > Gain is more marginal (unless the part can actually be damaged by
> > > a wrong value - which I hope it can't!).  I'm not that fussed
> > > as there are definitely reasons to specify a default scale to
> > > cover the reasonable range on a pin.
> > > 
> > > Thanks,
> > > 
> > > Jonathan
> > Hi Jonathan,
> > 
> > Thank you for the review! So, how should I proceed?
> > 
> > First, we need an adc.txt file where "bipolar" and something like
> > "diff-
> > channels" should be documented. Should the file be placed under
> > Documentation/devicetree/bindings/iio/adc?
> Yes.
> 
> > 
> > Regarding the "odr-hz" property, it totally makes sense to remove it
> > from
> > the DT. How about the "gain"? Should we leave it in the DT and also add
> > the
> > possibility to be configured from user space?
> Look at other bindings. I think there are others having gain. If not,
> then it probably should only be user space configurable. If so, then
> can it be a common property too.
> 
> Rob
> 

Hi Rob,

I found only a couple of examples using gain in other bindings, so I guess
it's not common practice. I will remove the gain as well from the DT and
set it with the default of 1.

@Jonathan: I think that IIO_CHAN_INFO_HARDWAREGAIN is the attribute that
can be used in user space?

Thank you!
-Stefan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ