Re: [PATCH 1/3] iio: adc: ad7923: fix channel readings for some variants

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

 



On Sun, 2022-09-11 at 12:26 +0100, Jonathan Cameron wrote:
> On Fri, 9 Sep 2022 17:14:11 +0200
> Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:
> 
> > Some of the supported devices have 4 or 2 LSB trailing bits that
> > should
> > not be taken into account. Hence we need to shift these bits out
> > which
> > fits perfectly on the scan type shift property. This change fixes
> > both
> > raw and buffered reads.
> 
> Hi Nuno,

Hi Jonathan,

> 
> Seems that all the values of shift are 12 - realbits.
> If that's the case, can we reduce the noise this patch creates by
> just
> updating AD7923_V_CHAN() to set .shift = 12 - (bits) ?
> 

Yes, it should be pretty much the same... As I don't have any strong
feelings I can do as you suggest.

> I guess that's not as flexible if anyone adds support for a device
> with different shifts, but I suspect that may never happen.
> 

Or a device with realbits > 12. But yeah, I'm also fairly positive we
won't see that happening...

- Nuno Sá





[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