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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 6 Jul 2022 13:06:17 -0500
From:   Nishanth Menon <nm@...com>
To:     Jonathan Cameron <jic23@...nel.org>
CC:     Angelo Compagnucci <angelo.compagnucci@...il.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Alexandru Ardelean <ardeleanalex@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Florian Eckert <fe@....tdt.de>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: ti-adc128s052: Add lower resolution
 devices support

On 17:40-20220701, Jonathan Cameron wrote:
> On Thu, 30 Jun 2022 23:29:19 -0500
> Nishanth Menon <nm@...com> wrote:
> 
> > The adcxx4s communicates with a host processor via an SPI/Microwire Bus
> > interface. The device family responds with 12bit data, of which the LSB
> > bits are transmitted by the lower resolution devices as 0. We don't need
> > to mess with ADC108S102_BITS as a result for the lower resolution
> > devices.
> 
> whilst not strictly necessary I would prefer we did as it may reduce
> storage requirements, computation complexity etc for userspace (particularly
> if they are 8 bits).
> 
> Would affect scale and shift so slightly more complex, but not a lot
> so still a fairly simple change.  Just add resolution to your config
> structure and duplicate it where necessary to allow whatever resolutions
> we support.
> 
> > 
[...]

> >  #include <linux/acpi.h>
> > @@ -185,6 +199,12 @@ static const struct of_device_id adc128_of_match[] = {
> >  	{ .compatible = "ti,adc122s021", .data = 1},
> >  	{ .compatible = "ti,adc122s051", .data = 1},
> >  	{ .compatible = "ti,adc122s101", .data = 1},
> > +	{ .compatible = "ti,adc102s021", .data = 1},
> > +	{ .compatible = "ti,adc102s051", .data = 1},
> > +	{ .compatible = "ti,adc102s101", .data = 1},
> 
> Numeric order preferred. Not sure why these are in the middle.
> 
> > +	{ .compatible = "ti,adc082s021", .data = 1},
> > +	{ .compatible = "ti,adc082s051", .data = 1},
> > +	{ .compatible = "ti,adc082s101", .data = 1},
> 
> Andy's comment on using pointers instead follows through to here.
> To describe the channels more fully you'll need additional
> _config[] structures.


Thanks folks for the feedback. Will try to do a better job on the next
rev.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ