Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2294547rdb; Mon, 25 Dec 2023 04:57:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwN5W7D3pdkbegnJ/09c7r+CsJq5XARvZRDySkNIQyMqWjpd+mROJZ1iJWW06Woi9n3fbl X-Received: by 2002:a50:bac9:0:b0:553:2bcb:144c with SMTP id x67-20020a50bac9000000b005532bcb144cmr4342353ede.24.1703509077164; Mon, 25 Dec 2023 04:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703509077; cv=none; d=google.com; s=arc-20160816; b=IlFOx9mAuPmWUpsq078ILWzX36ITY5iiaFrT4tWKezWoGKAuynyM9RHDWACyH26U3G fQ/9PF/hm2KiFgKeWL3oAaPJrU+7bqe8ZAWQaOi+Uh221apMTnHb2sRSnvWRz5B8fC7N vciLU/0StHczj+9WTKBTo0NSQd21DA+uFU95UzJpMfvK7nbdN5ZcT12qFulwy03nYMO3 SLytgYv2+2OM7wg0u9ll/2DJo5SvUUMdAaU574i8r5uDfVtBlqJvznR8Nv7/P3jUnjm7 r/+noak1EVoCjRJKQ0TatyNMMPtop2VSuKAVZBbjBzMPQrGBV4oDBu0UuI+suUu/LX+0 s+tg== 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=2836GHVSMxD4pEMsvcSkpc9zsaMTJx5V60Hbz6IE2rg=; fh=Ifj1hXKjRE8n7vCCCrqGYGuNXNRkcLN2BUW2Z1aGwwo=; b=ZNkCWqDieSU0cVS/ov9EuPlBgAeNpII+gm30Z7liyV4q4pJiZRDxoV6P+GAGAC6TGN 3c0cnvkctjJrA9GPs9GXJcx5UcjeJlAobDZVn+n2tTvvoqQDjuObiDzKQ4j5rxyinHot S5yNPATYXO2jNo0jopKlJDLfu1a3q2D41QFBUUGQ8o29Xvg63NzytRvGMP47j/WB0CJd 2LRbvc0UVoqVhMLicMTjzBB/5M3QtJt0wvAf+GYhBeAfTPcul+J2fyyr8wOFhooijeew CeaqBAy9JPjMZAPEKiMAZ1EeNBhRdBRQ3VBlVXivfxrd3jyCPrYfYygcd8CTehkysIM5 BZdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=arNMY6Vq; spf=pass (google.com: domain of linux-kernel+bounces-11040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11040-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a4-20020a05640213c400b005549bef12b0si1885049edx.15.2023.12.25.04.57.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 04:57:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=arNMY6Vq; spf=pass (google.com: domain of linux-kernel+bounces-11040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11040-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BD8A91F2215C for ; Mon, 25 Dec 2023 12:57:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7621451C4F; Mon, 25 Dec 2023 12:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="arNMY6Vq" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 F3F1550253 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 Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a233bf14cafso446997766b.2 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=hAkdfsqYjGBED0xlmoTDalnsQBgRVkx2Tk+3Y3bTAHpxajQd2vtM05tCEmPV32mIVZ l+D9VGNNUEsz0kS74BQUtZlV5Y4//szlYMNtjHcTwmgqXfechfCeaEXu7DqcMaCXZNsC KWVeNu2RLF2RZRpA9Tjj7q+E+r7qM6m1h8qeH37FnQgF/MHO+SWNrUMnu/5+I3ENQPgQ RtXmkMLvWjsX/l72E/2Wg2SY3iL11G86dmqiJt6nRbz1WRvHomp0bQVxdejK+WsON6Jz Hl7553SdDJiLHFhuomc9XYga0cfNnjqDqMJtzEqb2BP/M8BDAvjKVxUGvGnlXhNDyRhK UK9w== X-Gm-Message-State: AOJu0YzrDcusdU2SQ9cB3ATpP9fKYdqfqm+LgwnvtiS74EqQZipJdOGw 9tpN+nEEVbva1IZsHG8QaB4JDSAuina80Q== 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: 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 , 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 TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2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Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq 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