Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2311888rdb; Mon, 25 Dec 2023 05:34:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvxTfeUNEvKx8D7nUXsrlRHBYj53HcGphf5+j129JXeksssMD1+9fAhalFtzcFKwv3JY1D X-Received: by 2002:ac8:5746:0:b0:41c:bad9:6045 with SMTP id 6-20020ac85746000000b0041cbad96045mr8287136qtx.14.1703511256054; Mon, 25 Dec 2023 05:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703511256; cv=none; d=google.com; s=arc-20160816; b=KLZejAEGQ4jQbaJ0b8Q9TCJZmq5m6deTNrBcPvs/GI4e2UL7uTu+mVee/lG4QIYuos aWP20kDItUp33+SNjG2ND7+32R16yEBnsaUA/SFW86+mJIuDfYwDFhWgGKrdQIEdKOoB r6HPZdcqDbTpE0T66dmyXLXzpHVa62EiE/Sm30FFqCAH4XOtn+YMrn3aY0aqO5qwyHfW Tl+zhh3gA4eqaUpKx4NglOs3GehjRXPJtJ5mFpRJTRGiuBjWQ2dI7cxedtYSIbnCmM1R UodtikI5S7ULzpIswnqd4cLZvxaitIDnSqxkRnniX8J+iRzXsEWfppIyOoId5A0XU3bd EYQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=p4o+SIPtv+npV17Pzay9SK/koHZbp3RfZeUHqh9OZTU=; fh=pP1cX7+ecaugaQZIV40l+Ch/0PidZYHBvB59D0+iB+M=; b=kv54dcIznU/y76qn2YE0TrHVSt3f5ANXytb++Te3Y5x1NVNxllJjJ4m48agefQaYks Zm/0P9txIkUvWbdzlZUNk3vUj0aNETG6JsKTWmXfuOBIFkpX6P33bvqUnFgjdiS83mUg VzDYFUHSrg43N3RaQGj2GTW2YvDFx8xKkBQZOb2vCuNNjqnQ0YRDN4fleE4PBDb9sYLn DEfy9Z4RVssIXSG8Q/KZ2/hjlA7rKp81O18jEicLDklY11MI/Zi53pAQ3nRu3GEB9OFp 9niYaDS/5ifTO3F5oVXptW39sAollEt4+i9kFHx9vMiQefFFw7JZ7FXez0DOdovTXsuH pasg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DdP6NzjU; spf=pass (google.com: domain of linux-kernel+bounces-11066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o14-20020ac85a4e000000b00423818038aasi10408218qta.439.2023.12.25.05.34.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 05:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DdP6NzjU; spf=pass (google.com: domain of linux-kernel+bounces-11066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B845D1C211FE for ; Mon, 25 Dec 2023 13:34:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90357524AA; Mon, 25 Dec 2023 13:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DdP6NzjU" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27F1C51C52 for ; Mon, 25 Dec 2023 13:34:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-55361b7f38eso4338746a12.0 for ; Mon, 25 Dec 2023 05:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703511245; x=1704116045; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=p4o+SIPtv+npV17Pzay9SK/koHZbp3RfZeUHqh9OZTU=; b=DdP6NzjUST8X9/NEzhCWV1fK+qUHQ3rxPtsSYYJV/CbQcU2uBK2ZQOxtwqJr9NTjqh eYrhoJySlZmDJzyFfIqv82obOxL/u2wYPoA1QRFUvKzavE8lqG6H1sUebaOEJqt5/Izi kks8umYmF6JjaTH2Q75GjTNLrecmBPBEK1LddlKusRgQZH6MP6SfCLHUFRSJh6DKzsRj XEQh01QBUfVoZIYP3rBtXWM5jvQknO8oi68hR43eX0vmbBA0GlDTZXwKMYRktmaIcqq+ /7bnyBUpOv5okZiSwLWt+/WVqtCXM558tVath2nZBGt9hWfDYn3TONpf1XwxXUYlITNa E2Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703511245; x=1704116045; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=p4o+SIPtv+npV17Pzay9SK/koHZbp3RfZeUHqh9OZTU=; b=BQQCpScRxEjn33yRgFdPewg7QdWoRgF5cPy0tCVvek8DtVqoCKnZ8VjlemRwu+mdgc RA8/DSM6LNgkhJthFINxj7uFf6ymrdKWWIcJNylxhG+z3PCLQ/PU/htFHxR9/isMcZpT Bt1RM21m7IOWMgpqm5bQYI2WCV+FNuJvFG9NP5z31GlpoOkvEKt1NGFJiD1t/dHGVwve clxQyqsXQXtsyMXuDIlAKPYner0iglWMz3UVQO0fCB4GEwi3IlveHi9gD9W1gR/GvBS8 MMruFyp0KGKDe6LqdXvu0K280N+9UwUy81aQd9YYEVsHMhjl4xVNHsHv9D8z//7mSfLN up4Q== X-Gm-Message-State: AOJu0YxvXbv87LVAwkTOuM4dT6x0drWxKjfxgL93AlfFMcfN1yRlJVQf OApLozedm34XVVW2eGuGU8kMij7e//xRtQ== X-Received: by 2002:a50:935a:0:b0:54c:b889:9c11 with SMTP id n26-20020a50935a000000b0054cb8899c11mr2380971eda.98.1703511245435; Mon, 25 Dec 2023 05:34:05 -0800 (PST) Received: from [192.168.0.22] ([78.10.206.178]) by smtp.gmail.com with ESMTPSA id en2-20020a17090728c200b00a2609ff4119sm773235ejc.213.2023.12.25.05.34.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Dec 2023 05:34:05 -0800 (PST) Message-ID: <503bc876-59d1-4fcb-b0b5-2dd88c62987c@linaro.org> Date: Mon, 25 Dec 2023 14:34:04 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 02/10] dt-bindings: iio: pressure: honeywell,mprls0025pa.yaml add pressure-triplet Content-Language: en-US To: Petre Rodan Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Klinger , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <20231224143500.10940-1-petre.rodan@subdimension.ro> <20231224143500.10940-3-petre.rodan@subdimension.ro> <49525adf-1540-4801-8cdf-be1c0fe640f6@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVT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jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/12/2023 14:23, Petre Rodan wrote: > > hello Krzysztof, > > On Mon, Dec 25, 2023 at 01:57:39PM +0100, Krzysztof Kozlowski wrote: >> On 24/12/2023 15:34, Petre Rodan wrote: >>> @@ -54,14 +57,6 @@ properties: >>> If not present the device is not reset during the probe. >>> maxItems: 1 >>> >>> - honeywell,pmin-pascal: >>> - description: >>> - Minimum pressure value the sensor can measure in pascal. >>> - >>> - honeywell,pmax-pascal: >>> - description: >>> - Maximum pressure value the sensor can measure in pascal. >>> - >>> honeywell,transfer-function: >>> description: | >>> Transfer function which defines the range of valid values delivered by the >>> @@ -72,17 +67,52 @@ properties: >>> enum: [1, 2, 3] >>> $ref: /schemas/types.yaml#/definitions/uint32 >>> >>> + honeywell,pressure-triplet: >> >> Why not putting it just before existing properties? > > I'd like to have pmin-pascal, pmax-pascal as the last two honeywell specific > properties, since they are not to be used unless someone has custom silicon. > so we will still have a block moved just like above. > the most logic order is the one I proposed above: > > honeywell,transfer-function: > [..] > honeywell,pressure-triplet: > [..] > honeywell,pmin-pascal: > [..] > honeywell,pmax-pascal: > [..] > > since the last 3 are tied together as we will see below. > is there any reason you want this order to change? I just don't get why moving the code instead of adding new property next to them. The order is often alphabetical. > >>> + honeywell,pmin-pascal: >>> + description: >>> + Minimum pressure value the sensor can measure in pascal. >>> + To be specified only if honeywell,pressure-triplet is not set. >> >> The last sentence is redundant - schema should enforce that. > > when someone generates the dtbo files via > > cpp -nostdinc -I include -I ${LINUX_SRC}/include/ -I arch -undef -x assembler-with-cpp ${file}.dts "${BUILD_DIR}/${file}.dts.preprocessed" > dtc -@ -I dts -O dtb -o "${BUILD_DIR}/${file}.dtbo" "${BUILD_DIR}/${file}.dts.preprocessed" And how this command matters? DT overlays are checked, so error is printed. > > the schema is not checked in any way. When I run `make` the schema is also not checked, so is it an argument to add anything to the binding? No. Drop redundant text. > so unless people can be bothered to understand the yaml intricacies in the > bindings file, I feel they need to see that redundant information there, see below. > >>> +oneOf: >>> + - required: >>> + - honeywell,pmin-pascal >>> + - honeywell,pmax-pascal >>> + - required: >>> + - honeywell,pressure-triplet >>> + >>> +allOf: >>> + - if: >>> + required: >>> + - honeywell,pressure-triplet >>> + then: >>> + properties: >>> + honeywell,pmin-pascal: false >>> + honeywell,pmax-pascal: false >> >> This allOf is not needed. > > speaking for intricacies, if the allOf is removed, then a binding containing > > honeywell,pmax-pascal = <840000>; > honeywell,pressure-triplet = "0015PA"; > > would be considered to be correct by the schema, but that would be the incorrect > result. so afaict allOf needs to stay, and so does the redundant text. Really? Did you test it? Best regards, Krzysztof