Re: [PATCH 2/2] iio: adc: ti-adc128s052: Add lower resolution devices support

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

 



On 17:40-20220701, Jonathan Cameron wrote:
> On Thu, 30 Jun 2022 23:29:19 -0500
> Nishanth Menon <nm@xxxxxx> 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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux