From: Jonathan Cameron <jic23@kernel.org>
To: <Victor.Duicu@microchip.com>
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: Fri, 18 Apr 2025 17:01:07 +0100 [thread overview]
Message-ID: <20250418170107.2fa397e7@jic23-huawei> (raw)
In-Reply-To: <b3ffdcd05578742b3b992102e7930ac123ee7d51.camel@microchip.com>
On Thu, 17 Apr 2025 11:40:53 +0000
<Victor.Duicu@microchip.com> wrote:
> 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?
yes. It makes it easier for binding review to just have statement in the
patch description of how they are different in ways the driver needs
to know about. Can be simple things like 'only some devices have X'
or they have differing numbers of channels.
>
>
> > 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.
Maybe - though also easy to control from userspace by making the
offset writeable.
>
> > > +
> > > + 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.
For the betas I was more curious about why the dt needs to distinguish
between a manual setting and autodetection. When is autodetection
a bad idea for example?
Jonathan
>
> Kind regards,
> Victor Duicu
> ...
> > >
> >
>
next prev parent reply other threads:[~2025-04-18 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 13:26 [PATCH v1 0/2] add support for MCP998X 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
2025-04-18 16:01 ` Jonathan Cameron [this message]
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=20250418170107.2fa397e7@jic23-huawei \
--to=jic23@kernel.org \
--cc=Marius.Cristea@microchip.com \
--cc=Victor.Duicu@microchip.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--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