From: Jonathan Cameron <jic23@kernel.org>
To: Andrew Hepp <andrew.hepp@ahepp.dev>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: [PATCH v3 1/2] dt-bindings: iio: Add MCP9600 thermocouple EMF converter bindings
Date: Sat, 4 Mar 2023 13:06:25 +0000 [thread overview]
Message-ID: <20230304130625.2b5536d8@jic23-huawei> (raw)
In-Reply-To: <55efb99d-f84a-0df9-67fa-0bf5c1372a42@ahepp.dev>
On Sat, 4 Mar 2023 04:36:49 -0800
Andrew Hepp <andrew.hepp@ahepp.dev> wrote:
> Hi Krzysztof,
>
> Appreciate the feedback! Snipping for brevity.
>
> On 3/4/23 3:20 AM, Krzysztof Kozlowski wrote:
>
> ...
> >> + maxItems: 1
> >> +
> >> + interrupts:
> >> + minItems: 1
> >> + maxItems: 6
> >> +
> >> + interrupt-names:
> >> + minItems: 1
> >> + maxItems: 6
> >> + items:
> >> + enum:
> >
> > The interrupts should be usually strictly ordered and you allow any
> > combinations. Why?
> >
> > Why are they optional?
>
> The driver as currently written doesn’t support any interrupts. The
> device does not require interrupts to function.
>
> This is the first dt-binding I’ve written, so it’s very possible that
> I’ve made a mistake, but I believe any combination of interrupts should
> be valid. Each of the interrupts listed represent an independent
> physical pin of the mcp960x chip. That pin might not be connected at
> all, so it seems to me that any combination of interrupts should be allowed.
>
> MCP9600 and MCP9601 chips have four alert interrupts that trigger when
> temperature crosses a threshold (with configurable hysteresis). The
> MCP9601 adds short and open circuit detection interrupts.
This is a very common situation for sensors, hence the use of
interrupt-names to allow us to specify any subset. A driver using
these will then need to cope with a random subset (of course it's allowed
to just not use any of them at all if only some are wired, or any other
policy the driver author wants to use).
Board designers love to save pins on their interrupt controller
so not wiring them all up is very common.
Jonathan
>
> >
> >
> >> + - open
> >> + - short
> >> + - alert1
> >> + - alert2
> >> + - alert3
> >> + - alert4
> >> +
> >> + thermocouple-type:
> ...
>
> Thanks,
> Andy
next prev parent reply other threads:[~2023-03-04 13:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 0:41 [PATCH v3 1/2] dt-bindings: iio: Add MCP9600 thermocouple EMF converter bindings Andrew Hepp
2023-03-04 0:41 ` [PATCH v3 2/2] iio: temperature: Add MCP9600 thermocouple EMF converter driver Andrew Hepp
2023-03-04 11:20 ` [PATCH v3 1/2] dt-bindings: iio: Add MCP9600 thermocouple EMF converter bindings Krzysztof Kozlowski
2023-03-04 12:36 ` Andrew Hepp
2023-03-04 13:06 ` Jonathan Cameron [this message]
2023-03-04 17:09 ` 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=20230304130625.2b5536d8@jic23-huawei \
--to=jic23@kernel.org \
--cc=andrew.hepp@ahepp.dev \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-iio@vger.kernel.org \
--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