From: Conor Dooley <conor@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Petre Rodan <petre.rodan@subdimension.ro>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: pressure: honeywell,mprls0025pa
Date: Fri, 22 Dec 2023 15:27:36 +0000 [thread overview]
Message-ID: <20231222-thread-secret-d8b49c896249@spud> (raw)
In-Reply-To: <20231221110417.0bd5b002@jic23-huawei>
[-- Attachment #1: Type: text/plain, Size: 2568 bytes --]
On Thu, Dec 21, 2023 at 11:04:17AM +0000, Jonathan Cameron wrote:
> On Wed, 20 Dec 2023 19:25:25 +0200
> Petre Rodan <petre.rodan@subdimension.ro> wrote:
>
> > hi Jonathan,
> >
> > On Wed, Dec 20, 2023 at 03:16:45PM +0000, Jonathan Cameron wrote:
> > > On Tue, 19 Dec 2023 15:02:20 +0200
> > > Petre Rodan <petre.rodan@subdimension.ro> wrote:
> > > > honeywell,pmin-pascal:
> > > > description:
> > > > Minimum pressure value the sensor can measure in pascal.
> > > > + To be specified only if honeywell,pressure-triplet is set to "NA".
> > > That just added a backwards compatibility break. It would be fine
> > > if there was a default: NA for honeywell,pressure-triplet or a check that either
> > > one or the other was supplied (which I'd prefer). Thus old bindings will work
> > > and new ones also supported.
> >
> > ok, I see your reasoning. but in this second scenario that you prefer how can we
> > propery define the 'required:' block? an equivalent to
> >
> > required:
> > - compatible
> > - reg
> > - (honeywell,pmin-pascal && honeywell,pmax-pascal) || honeywell,pressure-triplet
> > - honeywell,transfer-function
>
> Yes, it would end up something like that. There are exclusive or examples in tree.
> I think something like dac/adi,ad3552r.yaml
> should work.
>
> oneOf:
> - required:
> - honeywell,pmin-pascal
> - honeywell,pmax-pascal
> - required:
> - honeywell,pressure-triplet
>
> but you will want to try all the cases to make sure that works (my ability to
> figure these ones out is tricky).
>
> + you ideally want to exclude them all being set which is fiddlier.
>
> Some similar examples but they are based on a value in the property. I'm not
> sure how you check for it just being defined.
>
> Something along lines of.
>
> allOf:
> - if:
> properties:
> honeywell,pressure-triplet
> then:
> properties:
> honeywell,pmin-pascal: false
> honeywell,pmax-pascal: false
>
> Might work? I always end up trawling the kernel to find a similar example for cases but
> can't find anything closer right now.
I hate to admit it, but I'm not great at expressing these in the minimum
forms either, but I think you're missing a "required" from here, in place
of the "properties":
allOf:
- if:
required:
- honeywell,pressure-triplet
then:
properties:
honeywell,pmin-pascal: false
honeywell,pmax-pascal: false
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-12-22 15:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 13:02 [PATCH 0/2] iio: pressure: changes to mprls0025pa Petre Rodan
2023-12-19 13:02 ` [PATCH 1/2] dt-bindings: iio: pressure: honeywell,mprls0025pa Petre Rodan
2023-12-20 15:16 ` Jonathan Cameron
2023-12-20 17:25 ` Petre Rodan
2023-12-21 11:04 ` Jonathan Cameron
2023-12-22 15:27 ` Conor Dooley [this message]
2023-12-23 11:28 ` Petre Rodan
2023-12-19 13:02 ` [PATCH 2/2] iio: pressure: change driver for Honeywell MPR series Petre Rodan
2023-12-19 15:41 ` Andy Shevchenko
2023-12-19 16:51 ` Petre Rodan
2023-12-20 15:13 ` 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=20231222-thread-secret-d8b49c896249@spud \
--to=conor@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petre.rodan@subdimension.ro \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.