Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp67763rdb; Thu, 21 Dec 2023 03:04:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHhsUyaN6+PxN5lffE4afGlW3tw8Cpk1w49XyRidsEZ3rGLva6QBvcqeMSRmkWHHggQXvV X-Received: by 2002:a05:6e02:1d16:b0:35f:c9a7:aa87 with SMTP id i22-20020a056e021d1600b0035fc9a7aa87mr3261637ila.87.1703156693986; Thu, 21 Dec 2023 03:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703156693; cv=none; d=google.com; s=arc-20160816; b=ALxaMXVMnHIk43XvHnasoTApYMN9dZKb0nyWxAbH9lnlQdGnnVfdSZHaV+gcj+HyZ/ WJL1A4JyfEEtBsAEjuAqPEeiWSPhivvSxV91t8khzH1M6Qf0UhG3noV2rNyaTGGhdiay JI7qOCebRGn/e8chxjHMJ3IPdtiGt7cxUKt7/LVH6DqM7vRjZP/+nLz4VHgR2TApKspn MMnphR+xPkrsniOm9zFSzu48bGxrZF2XkVM8uRV7jenu7rP14NIiWEQX5uHAItv8xrFs nr/N3zYNhEYzWuKOk6agzLb5/d560xWPOgIMEJz4KSSywT2AgtZ2/aNC4jNB1LFmuQZa +s8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=dMDXHMzeZogCabMlyHJvjQs91/tE12jrhIpjbabaHO8=; fh=FFuuCLJw8DiUM9R6J74faLg01BLjqAtCg8VwUx2U8SI=; b=IyvdMSeiXE8emEdpVE1+vmzk99thBvTMLnswQe+hLK3m/IgqiH+4pOKwEdau9aXkMl VW299Q4lD1FI1KvAH7AjInlHLcDCcbtNZrrsQD5U27F8r5+CcExQDcpKB8wRiYYzBsIs bsLQDMq+S2MCYJTdxI+4IVHLtQa6Uck4lhFB6mvzZ/m1uYWxzbw9EYLra4op44qBZL1C QXhPkWT17C3/uTtFQbPM0yq3X4oX8DTGGGAfIz9f+4SQlw+BR1529P0jvZqrAM7+tkYS W2bbutPuzRyDtuQVyC2imrtD+ETzNxOVJ+Ys0sxE7BxJItDJ06QytrRam1/umC22eV/5 ryLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EUoPh49m; spf=pass (google.com: domain of linux-kernel+bounces-8261-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bi4-20020a056a02024400b005ca1286f8f6si1384114pgb.808.2023.12.21.03.04.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 03:04:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8261-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EUoPh49m; spf=pass (google.com: domain of linux-kernel+bounces-8261-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8261-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BA01028622F for ; Thu, 21 Dec 2023 11:04:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE8286BB54; Thu, 21 Dec 2023 11:04:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EUoPh49m" 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 015176BB29; Thu, 21 Dec 2023 11:04:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58B35C433C7; Thu, 21 Dec 2023 11:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703156672; bh=TDLMCFaG9iF23iCXhZOU0JoIuuWfRNEqblfM8hy8xvs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EUoPh49m8aTvyeCHkfDHfKZrqlD/vPcrGAerxnsdXEcMdnehbZ3ZEedRcT1OtQ2J/ hJRc3dC2F3YN3nyu2jmduA/FVttZ1TTXkHraK5E6+QdibhLxoKuA98BGE4VsVwJCCV qj1VT5X1K4Tq4yugwZRBHpi9q5FRsdaxYACIA/m+jdWCYe3wH9g7OCUcsto03Xryio Uz/ws5qB2TKkbDVBQZ9fK1ycCAsVvyepgD713pQ5nCYHsG0wjwoPR19xkWk80gsVc9 SUr1+j24/QRRKO0orl6aDu4DFOcLKqm9u2/qNugYpjZuYKVR7d9/ZOlk4Mfz5Ybrvm jp4IMblXnLNdg== Date: Thu, 21 Dec 2023 11:04:17 +0000 From: Jonathan Cameron To: Petre Rodan Cc: 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: <20231221110417.0bd5b002@jic23-huawei> In-Reply-To: References: <20231219130230.32584-1-petre.rodan@subdimension.ro> <20231219130230.32584-2-petre.rodan@subdimension.ro> <20231220151645.16ada807@jic23-huawei> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 20 Dec 2023 19:25:25 +0200 Petre Rodan 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 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. Jonathan > > > thanks, > peter