Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp870534rdb; Fri, 22 Dec 2023 07:27:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQIbSm6v2zcPmBcs6SL1QzGu6+EEREk3MRfQ105MBJjavsKNQNil/OLR47N+oVeExYSxIA X-Received: by 2002:a17:907:ea2:b0:a23:53b0:82ea with SMTP id ho34-20020a1709070ea200b00a2353b082eamr1309450ejc.24.1703258872537; Fri, 22 Dec 2023 07:27:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703258872; cv=none; d=google.com; s=arc-20160816; b=pZoQZA9preAyoHWfm+M6kwQo9MMxiFrwTEpTCIK+OiKoEhjfqUaX22IAyNxGXTERYz 3FKCG5tDNR1v/jy8vM3+E+M6zfh8ibVucv6e/8Zi8QHYCel5XViJsI+QfhPsZk0oaAWg OvJ0EOqPOp7HxPhMIjn9CMKS50aIkfs/YZUL+kS+cMEtNamvuklascsYKkTqSAy1Iup2 eYioP5LCIvvxij+Gfsa5WCHbU2m2/YW+FJ8PhnQDiqFZUEn6v111vKzzeMe8KSunxJTi 0WSIN+d2Nx6fasyuyXL5gwASKkw1Wg/5si0OwjfQ2lKDPSSc20aMOW2t/HtaXIDYTKM9 0Z2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3C0rzFC7KtJPnm8tdFutOmH9wwRfEmzdG4PJVlAxnG4=; fh=OpvAQn8hNvZxarkduM5odwYULrjGXEMuUKYQOtIIFvI=; b=og/JF34PVVS9f7n742BB3ieITO8aPsnxhnAq5v9PBAi7/nJhAkgfN2jJJMSuztuNfD Ap6A/KxS2yuCtQVCsYggg4LsCgCsvlbSnR5AUZersvSrqYwvhx0KHB8gJ/4TX11Tb1q4 /LoXoWCEm4ngRF5tKUIHajx2BXhk/ZbUniLnZvBUVulnpw5Y7FbdqA9KPn08/MKlE6f6 WuHRHETr2VbkD6xkfTvKGI1G05/QJl0dXQssqrdrGyEfduloEOd+538POZ0LA8C6D6DK Fgt0k1U91DEwLruGxT1uwa1ujA/QeXeFLy8arL0e7tLcKW6M/hU01wipGkXkMqasCoac oxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mb8+WjAM; spf=pass (google.com: domain of linux-kernel+bounces-9838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o6-20020a17090611c600b00a269346aaf1si1826313eja.738.2023.12.22.07.27.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:27:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mb8+WjAM; spf=pass (google.com: domain of linux-kernel+bounces-9838-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4BE721F2690C for ; Fri, 22 Dec 2023 15:27:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 059F82376A; Fri, 22 Dec 2023 15:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mb8+WjAM" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F47123750; Fri, 22 Dec 2023 15:27:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFDD9C433C8; Fri, 22 Dec 2023 15:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703258860; bh=mric/lmzfirQKK3VimVwUxUikQJ+5ehDBdufnZS/Evs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mb8+WjAM5GCoxU8wGkpM0Z/bj4lVn1AVfjdMKnKleeEJjF0etVklkTODCXeXDscxW fAosX+182tQTt+kRQidLoTF9Txzp+mFmRLfx4M425PvigrNudFICkWCw2dRK/FH1gt A4xcv0c/eb/K5mcXSLdIinmaoUmxKstYub3jjSDSHXkI/cI8lep4aQMUzEGE6bOZPn 1dE5m/XH1EnWwhl04L60iKZJpJG2w5YbY5XAEiYPBmduWjnZeQdX31zwKZS10EA6J7 GvWQuCXYDBXDLQ2QMNfS5s1Dy+DQRrAaAKTrdxymvt8lq0TFm1gKhOrmnDzYcopZJr QvTnEkUIjC04Q== Date: Fri, 22 Dec 2023 15:27:36 +0000 From: Conor Dooley To: Jonathan Cameron Cc: Petre Rodan , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH 1/2] dt-bindings: iio: pressure: honeywell,mprls0025pa Message-ID: <20231222-thread-secret-d8b49c896249@spud> References: <20231219130230.32584-1-petre.rodan@subdimension.ro> <20231219130230.32584-2-petre.rodan@subdimension.ro> <20231220151645.16ada807@jic23-huawei> <20231221110417.0bd5b002@jic23-huawei> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ba29eN3gYKwLHH9V" Content-Disposition: inline In-Reply-To: <20231221110417.0bd5b002@jic23-huawei> --Ba29eN3gYKwLHH9V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 21, 2023 at 11:04:17AM +0000, Jonathan Cameron wrote: > On Wed, 20 Dec 2023 19:25:25 +0200 > Petre Rodan wrote: >=20 > > hi Jonathan, > >=20 > > On Wed, Dec 20, 2023 at 03:16:45PM +0000, Jonathan Cameron wrote: > > > On Tue, 19 Dec 2023 15:02:20 +0200 > > > Petre Rodan wrote: =20 > > > > 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". =20 > > > 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. =20 > >=20 > > ok, I see your reasoning. but in this second scenario that you prefer h= ow can we > > propery define the 'required:' block? an equivalent to > >=20 > > required: > > - compatible > > - reg > > - (honeywell,pmin-pascal && honeywell,pmax-pascal) || honeywell,press= ure-triplet > > - honeywell,transfer-function >=20 > Yes, it would end up something like that. There are exclusive or example= s in tree. > I think something like dac/adi,ad3552r.yaml > should work. >=20 > oneOf: > - required: > - honeywell,pmin-pascal > - honeywell,pmax-pascal > - required: > - honeywell,pressure-triplet >=20 > but you will want to try all the cases to make sure that works (my abilit= y to > figure these ones out is tricky). >=20 > + you ideally want to exclude them all being set which is fiddlier. >=20 > 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. >=20 > Something along lines of. >=20 > allOf: > - if: > properties: > honeywell,pressure-triplet > then: > properties: > honeywell,pmin-pascal: false > honeywell,pmax-pascal: false >=20 > Might work? I always end up trawling the kernel to find a similar exampl= e 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. --Ba29eN3gYKwLHH9V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZYWq6AAKCRB4tDGHoIJi 0sGFAQCS3lpqDDVpd0E7HfIT4+N4EHkkAJryhPfoBZyl0+bDSgEA5odFWMtIApkV 9fU4oaAh5VlqUtiwBtY1OCUWX+omLQ4= =2QDc -----END PGP SIGNATURE----- --Ba29eN3gYKwLHH9V--