lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZYbEYagM8qBf_cGB@sunspire>
Date: Sat, 23 Dec 2023 13:28:33 +0200
From: Petre Rodan <petre.rodan@...dimension.ro>
To: Conor Dooley <conor@...nel.org>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	Conor Dooley <conor+dt@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Rob Herring <robh+dt@...nel.org>,
	linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: pressure: honeywell,mprls0025pa


hello Conor,

On Fri, Dec 22, 2023 at 03:27:36PM +0000, Conor Dooley wrote:
> > >   - (honeywell,pmin-pascal && honeywell,pmax-pascal) || honeywell,pressure-triplet
> > Yes, it would end up something like that.  There are exclusive or examples in tree.

> > 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

thank you both for the above ruleset, it works like magic.

I spent hours trying to figure out the proper syntax but never got it right.

Merry Christmas!
peter

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ