From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.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 152C05026B for ; Mon, 25 Dec 2023 12:57:43 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="arNMY6Vq" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a1915034144so448436866b.0 for ; Mon, 25 Dec 2023 04:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703509062; x=1704113862; 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=2836GHVSMxD4pEMsvcSkpc9zsaMTJx5V60Hbz6IE2rg=; b=arNMY6VqQKbyw3/Pn8j3DMRnPjH8PDZpirBWyqzqBMsrPIRhqiNNuLH/x6LN5C3es+ B1Llyx8TBYqJzJTua1vloYE1ObVGAjswWINP9L2mhxj08RDH8GCRS6IgRTgDKA8MbWXL tTYrDI/CscfUeDm+wSrgWGQWackf44OZvFjbJKcFjugROaKp+cRPSaOkZW1EVjED5MNv iFPxOx4xpdETK7zVuIZiacPjSEOadWHaGJJ0D/N6lldcLQj8In8wbEAn9wfBU2Ews2Az O4nR+Lric38hY7TH0EeM2Y+8mmkw+mzqPBh0EznyfOdBYlz4FiJJ0k1UEG+wb2mTuxyL ckoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703509062; x=1704113862; 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=2836GHVSMxD4pEMsvcSkpc9zsaMTJx5V60Hbz6IE2rg=; b=efErGFn+P+xFrUfAL9Q9GrByQplORhqktmvU2nEUZM5QHUUqCn7CNlytMWM7rWpbE7 VIk7JaHnKKmi9OSQ2OePr2eslLk1F7nY64mJMosrNtCDztVw6+wRVUnb3iPXqizZ1bA9 mkJWXwCe99VZ5s0E3fxP1vYFDnh2aCQrepoSL2db0wF1C0EanyZDRQsUMWguq16OTLol ELalnCGeUay4gKo0egvFqS/gXlYAFk7ajIsgeq9VOBIgw7Jp/mYSlUXngBwwGpm5+gNw a33v8YrqZtjU85QKL07UmwCEl3anKtc6SHgFWFHx3kPSn+vdnhl+Dz6rFtLpltcwIwRg UkNw== X-Gm-Message-State: AOJu0YzIgiKaT546ese3oSvnMALpiKLur2xLjgFruPEuW+oRaPR/EHBr /xq12YWsrG/5MNmIVQyOaPWaX5kfkv55SA== X-Google-Smtp-Source: AGHT+IF3g630AIr81g9cNDvz+AQCLGz/tKDwXjpQ2ROuD4l4fkq1lJln5pzdYNbmrAaSn/LXm9rvfw== X-Received: by 2002:a17:906:3406:b0:a23:55c6:8f23 with SMTP id c6-20020a170906340600b00a2355c68f23mr2401184ejb.129.1703509061911; Mon, 25 Dec 2023 04:57:41 -0800 (PST) Received: from [192.168.0.22] ([78.10.206.178]) by smtp.gmail.com with ESMTPSA id ge24-20020a170907909800b00a1c7b20e9e6sm4808930ejb.32.2023.12.25.04.57.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Dec 2023 04:57:41 -0800 (PST) Message-ID: <49525adf-1540-4801-8cdf-be1c0fe640f6@linaro.org> Date: Mon, 25 Dec 2023 13:57:39 +0100 Precedence: bulk X-Mailing-List: devicetree@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 , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: 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> 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 TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tp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jsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231224143500.10940-3-petre.rodan@subdimension.ro> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 24/12/2023 15:34, Petre Rodan wrote: > Change order of properties in order for the end user to de-prioritize > pmin-pascal and pmax-pascal which are superseded by pressure-triplet. > > Add pressure-triplet property which automatically initializes > pmin-pascal and pmax-pascal inside the driver > > Rework honeywell,pmXX-pascal requirements based on feedback from > Jonathan and Conor. > > Signed-off-by: Petre Rodan > Signed-off-by: Andreas Klinger > --- > .../iio/pressure/honeywell,mprls0025pa.yaml | 64 ++++++++++++++----- > 1 file changed, 47 insertions(+), 17 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml > index 84ced4e5a7da..e4021306d187 100644 > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,mprls0025pa.yaml > @@ -19,14 +19,17 @@ description: | > calls them "mpr series". All of them have the identical programming model and > differ in the pressure range, unit and transfer function. > > - To support different models one need to specify the pressure range as well as > - the transfer function. Pressure range needs to be converted from its unit to > + To support different models one need to specify its pressure triplet as well > + as the transfer function. > + > + For custom models the pressure values can alternatively be specified manually. > + The minimal range value stands for the minimum pressure and the maximum value > + also for the maximum pressure with linear relation inside the range. > + Pressure range needs to be converted from the datasheet specified unit to > pascal. > > The transfer function defines the ranges of numerical values delivered by the > - sensor. The minimal range value stands for the minimum pressure and the > - maximum value also for the maximum pressure with linear relation inside the > - range. > + sensor. > > Specifications about the devices can be found at: > https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/ > @@ -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? > + description: | > + Case-sensitive five character string that defines pressure range, unit > + and type as part of the device nomenclature. In the unlikely case of a > + custom chip, unset and provide pmin-pascal and pmax-pascal instead. > + enum: [0001BA, 01.6BA, 02.5BA, 0060MG, 0100MG, 0160MG, 0250MG, 0400MG, > + 0600MG, 0001BG, 01.6BG, 02.5BG, 0100KA, 0160KA, 0250KA, 0006KG, > + 0010KG, 0016KG, 0025KG, 0040KG, 0060KG, 0100KG, 0160KG, 0250KG, > + 0015PA, 0025PA, 0030PA, 0001PG, 0005PG, 0015PG, 0030PG, 0300YG] > + $ref: /schemas/types.yaml#/definitions/string > + > + 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. > + > + honeywell,pmax-pascal: > + description: > + Maximum pressure value the sensor can measure in pascal. > + To be specified only if honeywell,pressure-triplet is not set. > + > vdd-supply: > description: provide VDD power to the sensor. > > required: > - compatible > - reg > - - honeywell,pmin-pascal > - - honeywell,pmax-pascal > - honeywell,transfer-function > - vdd-supply > > +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. Best regards, Krzysztof