Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Victor.Duicu@microchip.com
Cc: dlechner@baylibre.com, nuno.sa@analog.com,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, jic23@kernel.org, krzk+dt@kernel.org,
	andy@kernel.org, linux-kernel@vger.kernel.org,
	Marius.Cristea@microchip.com, conor+dt@kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: temperature: add support for MCP998X
Date: Fri, 6 Jun 2025 16:15:19 +0100	[thread overview]
Message-ID: <20250606-unfeeling-legacy-c7eab453b062@spud> (raw)
In-Reply-To: <91c1d757a4ac051c115a821779a8c1fba764ea05.camel@microchip.com>

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

Jonathan,

On Mon, Jun 02, 2025 at 02:48:52PM +0000, Victor.Duicu@microchip.com wrote:
> On Fri, 2025-05-30 at 16:55 +0100, Conor Dooley wrote:
> > On Thu, May 29, 2025 at 01:13:38PM -0500, David Lechner wrote:
> > > On 5/29/25 4:36 AM, victor.duicu@microchip.com wrote:
> > > > From: Victor Duicu <victor.duicu@microchip.com>
> > > > +  microchip,recd12:
> > > > +    description:
> > > > +      Enable resistance error correction for external channels 1
> > > > and 2.
> > > > +      Omit this tag to disable REC for channels 1 and 2.
> > > > +    type: boolean
> > > > +
> > > > +  microchip,recd34:
> > > > +    description:
> > > > +      Enable resistance error correction for external channels 3
> > > > and 4.
> > > > +      Omit this tag to disable REC for channels 3 and 4.
> > 
> > Why are these two devicetree properties, rather than runtime
> > controls?
> 
> The parasitic resistance added to the series resistance is dependent
> only on the circuit. 
> It is possible for the chip and the transistor to be at some distance
> from each other. The manufacturer can approximate the error added and
> decide if resistance error correction should be applied.

I don't think I buy this line of argument. The property is not
describing the hardware, it's literally being used as a toggle for some
software feature. It'd be more acceptable if it indicated that the chip
and transistor were distant, leaving software to make a decision on what
that meant. One user (say bsd) might want decide that the driver should
always enable it, but another (say linux) might expose it as a control
to userspace defaulting based the dt property.
Additionally, the name of the property is pretty awful, and does not
even hint at what it's doing - and there's no mention of why channel 1/2
and 3/4 are bound together.

> The user cannot influence the parasitic resistance nor calculate it.

I don't think that's super relevant here, since the property has nothing
to do with influencing or calculating the value. I meant deciding whether
or not the correction is applied, just as the dt property you propose
does now.

Cheers,
Conor.

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

  reply	other threads:[~2025-06-06 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29  9:36 [PATCH v2 0/2] add support for MCP998X victor.duicu
2025-05-29  9:36 ` [PATCH v2 1/2] dt-bindings: iio: temperature: " victor.duicu
2025-05-29 18:13   ` David Lechner
2025-05-30 15:55     ` Conor Dooley
2025-06-02 14:48       ` Victor.Duicu
2025-06-06 15:15         ` Conor Dooley [this message]
2025-06-10 13:29           ` Victor.Duicu
2025-06-10 15:17             ` Conor Dooley
2025-05-29  9:36 ` [PATCH v2 2/2] " victor.duicu
2025-05-29 18:36   ` Andy Shevchenko
2025-05-30  4:39   ` kernel test robot
2025-05-30 16:53   ` Jonathan Cameron
2025-06-02 14:49     ` Victor.Duicu
2025-06-07 17:28       ` 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=20250606-unfeeling-legacy-c7eab453b062@spud \
    --to=conor@kernel.org \
    --cc=Marius.Cristea@microchip.com \
    --cc=Victor.Duicu@microchip.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@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