mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Victor.Duicu@microchip.com>
To: <jic23@kernel.org>
Cc: <Marius.Cristea@microchip.com>, <andy@kernel.org>,
	<dlechner@baylibre.com>, <linux-iio@vger.kernel.org>,
	<nuno.sa@analog.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] dt-bindings: iio: temperature: add support for MCP998X
Date: Thu, 17 Apr 2025 11:40:53 +0000	[thread overview]
Message-ID: <b3ffdcd05578742b3b992102e7930ac123ee7d51.camel@microchip.com> (raw)
In-Reply-To: <20250415185200.396d6356@jic23-huawei>

On Tue, 2025-04-15 at 18:52 +0100, Jonathan Cameron wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Tue, 15 Apr 2025 16:26:22 +0300
> <victor.duicu@microchip.com> wrote:
> 
> > From: Victor Duicu <victor.duicu@microchip.com>
> > 
> > This is the devicetree schema for Microchip MCP998X/33 and
> > MCP998XD/33D Multichannel Automotive Temperature Monitor Family.
> Hi Victor,
> 
Hi Jonathan,

> Please state briefly here in what way the parts are incompatible
> as a justification for no fallback compatibles.  Quite a bit
> of that will become apparent when you enforce validity of parameters
> as suggested below.
> 
I am a bit confused, could you elaborate a bit on this point? Are you
asking if the chips mcp9982, 83, 84 etc. are compatible among each
other?


> Various comments inline.
> > 
> > Signed-off-by: Victor Duicu <victor.duicu@microchip.com>
> > ---
> 
...
> 
> > +
> > +  microchip,extended-temp-range:
> > +    description: |
> > +      Set the chip to work in the extended temperature range -64
> > degrees C to 191.875 degrees C.
> > +      Omit this tag to set the default range 0 degrees C to
> > 127.875 degrees C
> > +    type: boolean
> 
> I'm curious.  Why does this belong in the DT binding?
> 

Regarding microchip,extended-temp-range, my perspective is that the
user knows beforehand which specific range of temperatures he needs.
For example, if the device to be measured is a freezer, the user would
be interested in temperatures below 0 degrees C. If we monitor a CPU,
the user would be interested in temperatures above 0 degrees C.

> > +
> > +  microchip,beta-channel1:
> > +    description: |
> > +      The beta compensation factor for external channel 1 can be
> > set
> > +      by the user, or can be set automatically by the chip.
> > +      If one wants to enable beta autodetection, omit this tag.
> > +      Please consult the documentation if one wants to set a
> > specific beta.
> > +      If anti-parallel diode operation is enabled, the default
> > value is set
> > +      and can't be changed.
> > +    type: boolean
> 
> Why is this a hardware thing that belongs in dt?  Enforce the
> constraint
> in the schema rather than text.
> 

With respect to the beta parameter, it is directly affected by the
hardware part used. For example a CPU diode would require a different
beta (that could be known by the manufacturer of the device and not
know by the final user) as opposed to a diode connected transistor
(that could be easily measured by the end user).

However, I remain open to the idea of moving temperature range and
channel betas to user space if you think it is better that way.

Kind regards,
Victor Duicu
...
> > 
> 


  reply	other threads:[~2025-04-17 11:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 13:26 [PATCH v1 0/2] " victor.duicu
2025-04-15 13:26 ` [PATCH v1 1/2] dt-bindings: iio: temperature: " victor.duicu
2025-04-15 17:52   ` Jonathan Cameron
2025-04-17 11:40     ` Victor.Duicu [this message]
2025-04-18 16:01       ` Jonathan Cameron
2025-04-16  6:45   ` Krzysztof Kozlowski
2025-04-15 13:26 ` [PATCH v1 2/2] " victor.duicu
2025-04-15 19:05   ` Andy Shevchenko
2025-05-22  9:18     ` Victor.Duicu
2025-05-23 16:21       ` Andy Shevchenko
2025-04-18 18:07   ` Jonathan Cameron
2025-04-28 12:57     ` Victor.Duicu
2025-04-30 16:17       ` Jonathan Cameron
2025-04-15 17:43 ` [PATCH v1 0/2] " Jonathan Cameron
2025-04-17  7:30   ` Victor.Duicu

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=b3ffdcd05578742b3b992102e7930ac123ee7d51.camel@microchip.com \
    --to=victor.duicu@microchip.com \
    --cc=Marius.Cristea@microchip.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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

all inboxes | Powered by JetHome®