Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Chris Hall" <c-hall@ti.com>, "Patrick Edwards" <pedwards@ti.com>,
	"Kurt Borja" <kuurtb@gmail.com>,
	"Nguyen Minh Tien" <zizuzacker@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/8] dt-bindings: iio: adc: add input-channel-rotation property
Date: Thu, 2 Jul 2026 19:58:32 +0100	[thread overview]
Message-ID: <20260702-litigator-commuting-5a3a37a7fb40@spud> (raw)
In-Reply-To: <20260701204133.2b77edab@jic23-huawei>

[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]

On Wed, Jul 01, 2026 at 08:41:33PM +0100, Jonathan Cameron wrote:
> On Fri, 26 Jun 2026 13:27:44 -0500
> David Lechner <dlechner@baylibre.com> wrote:
> 
> > On 6/26/26 11:14 AM, Conor Dooley wrote:
> > > On Thu, Jun 25, 2026 at 04:55:06PM -0500, David Lechner (TI) wrote:  
> > >> Add a generic input-channel-rotation property to adc.yaml. This is a
> > >> feature seen frequently in ADCs that are designed to measure resistive
> > >> loads, such as RTDs and strain gauges. Enabling this can reduce offset
> > >> errors by swapping the positive and negative input channels on every
> > >> other conversion. This can have side-effects in timing and filter
> > >> response, so it is not always desirable to enable this feature in some
> > >> applications. Therefore, it is best to make this a property that can be
> > >> enabled or disabled in the device tree.
> > >>
> > >> Signed-off-by: David Lechner (TI) <dlechner@baylibre.com>
> > >> ---
> > >> v2 changes:
> > >> * New patch.
> > >> ---
> > >>  Documentation/devicetree/bindings/iio/adc/adc.yaml | 7 +++++++
> > >>  1 file changed, 7 insertions(+)
> > >>
> > >> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > >> index 9ec1f447b565..3d52c00922c9 100644
> > >> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > >> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > >> @@ -81,6 +81,13 @@ properties:
> > >>        ADCs usually allow choosing between internal reference sources or a pair
> > >>        of external pins.
> > >>  
> > >> +  input-channel-rotation:  
> > 
> > I got some internal feedback after I sent this patch that "chopping" is the
> > more common terminology for this feature industry-wide, so in the next revision
> > I plan to change it into `input-chopping`.
> > 
> > >> +    type: boolean
> > >> +    description:
> > >> +      If set, the positive and negative input channels are allowed to be swapped
> > >> +      on every other conversion to reduce offset errors. This is also referred
> > >> +      to as "chop" in some datasheets.  
> > > 
> > > "allowed to be swapped" means that this property says the feature can be
> > > used, but userspace may have to be the thing that ultimately turns it
> > > on?  
> > 
> > No, I don't expect a userspace control for it. More like the driver should
> > enable it when possible, but a driver doesn't necessarily have to implement
> > it and everything will still work, just with less accuracy.
> 
> Perhaps we need something in this text to say when it should not be set
> in dt?

I think I would like a wording change from "allowed", to something that
is akin to "If set, the hardware supports swapping...". Allows sounds
too much like something that should be a userspace control.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-02 18:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 21:55 [PATCH v2 0/8] iio: adc: new ti-ads112c14 driver David Lechner
2026-06-25 21:55 ` [PATCH v2 1/8] dt-bindings: iio: adc: Add reference-sources property David Lechner
2026-06-26 16:12   ` Conor Dooley
2026-06-29  6:47   ` Kurt Borja
2026-06-25 21:55 ` [PATCH v2 2/8] dt-bindings: iio: adc: Add excitation current sources properties David Lechner
2026-06-26 16:10   ` Conor Dooley
2026-07-01 19:39   ` Jonathan Cameron
2026-07-01 22:07     ` David Lechner
2026-06-25 21:55 ` [PATCH v2 3/8] dt-bindings: iio: adc: Add burn-out current properties David Lechner
2026-06-26 16:12   ` Conor Dooley
2026-06-25 21:55 ` [PATCH v2 4/8] dt-bindings: iio: adc: add input-channel-rotation property David Lechner (TI)
2026-06-26 16:14   ` Conor Dooley
2026-06-26 18:27     ` David Lechner
2026-07-01 19:41       ` Jonathan Cameron
2026-07-02 18:58         ` Conor Dooley [this message]
2026-07-02 19:30           ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 5/8] dt-bindings: iio: adc: add ti,ads122c14 David Lechner (TI)
2026-06-25 22:12   ` sashiko-bot
2026-06-26 16:18   ` Conor Dooley
2026-06-26 18:35     ` David Lechner
2026-06-27 14:03       ` Conor Dooley
2026-07-01 19:50   ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 6/8] iio: adc: add ti-ads112c14 driver David Lechner (TI)
2026-06-25 22:07   ` sashiko-bot
2026-07-01 19:59   ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 7/8] iio: adc: ti-ads112c14: implement gain on internal short SYS_MON channel David Lechner (TI)
2026-06-25 22:08   ` sashiko-bot
2026-07-01 20:02   ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 8/8] iio: adc: ti-ads112c14: add measurement channel support David Lechner (TI)
2026-06-25 22:11   ` sashiko-bot
2026-07-01 20:20   ` Jonathan Cameron
2026-07-02  9:18     ` Andy Shevchenko
2026-07-02 14:18       ` David Lechner
2026-07-02 19:10         ` Jonathan Cameron

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=20260702-litigator-commuting-5a3a37a7fb40@spud \
    --to=conor@kernel.org \
    --cc=andy@kernel.org \
    --cc=c-hall@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuurtb@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=pedwards@ti.com \
    --cc=robh@kernel.org \
    --cc=zizuzacker@gmail.com \
    /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