devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>, "Nuno Sá" <nuno.sa@analog.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: [PATCH 1/3] iio: adc: ad7923: fix channel readings for some variants
Date: Mon, 12 Sep 2022 09:02:16 +0200	[thread overview]
Message-ID: <a8bcba9c64a6d38a82094aa38a4a7da1b2897fdf.camel@gmail.com> (raw)
In-Reply-To: <20220911122644.4d408fe6@jic23-huawei>

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@analog.com> 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á


  reply	other threads:[~2022-09-12  7:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 15:14 [PATCH 0/3] ad7923 fixes and full range support Nuno Sá
2022-09-09 15:14 ` [PATCH 1/3] iio: adc: ad7923: fix channel readings for some variants Nuno Sá
2022-09-11 11:26   ` Jonathan Cameron
2022-09-12  7:02     ` Nuno Sá [this message]
2022-09-09 15:14 ` [PATCH 2/3] iio: adc: ad7923: support extended range Nuno Sá
2022-09-09 15:14 ` [PATCH 3/3] dt-bindings: iio: adi,ad7923: add range-select property Nuno Sá
2022-09-11 11:28   ` Jonathan Cameron
2022-09-12  7:04     ` Nuno Sá

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8bcba9c64a6d38a82094aa38a4a7da1b2897fdf.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).