Message ID | 20240110172306.31273-3-petre.rodan@subdimension.ro |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp937558dyi; Wed, 10 Jan 2024 09:24:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9AuK1yDXcFfZCdnfRh8OpcRLG914uXA20IPp5XDWQVQtAflcKvs5odEm2wmeSK5ZsF7e3 X-Received: by 2002:a9d:6404:0:b0:6dd:de32:6f66 with SMTP id h4-20020a9d6404000000b006ddde326f66mr1014682otl.35.1704907478689; Wed, 10 Jan 2024 09:24:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704907478; cv=none; d=google.com; s=arc-20160816; b=UqSnB6V5KQY9ADXV3hflgrxAToWckvqhpWLXPGMX+t4ARMx1z4u60RfpeE47xAYVA8 TIFiKKIBNMMRXlnkiQZySWxzRY6ZoBejkNbdWqJMpBjYp/kYjfYgLGOjAiFJkeJsYLHE h9Cn/IcP4SxD2P12lmBDye1V4XX2KubyuU+ry1Fdc1MmPYZCFt6ay8q9SYmB4wyUO3Gk BZGPhvnVwYR4D85zqiSP3T3ziT0lbit2e2cNS3ohyDwgIbInVZtLyNssVhz8MqCaJ6/3 DnppDX1iiggTRuKaWb9RcBuDGRoPQCzAh7bo4PUDWzy2uSoF6OjNWHYSQAPIAonxfdih Q9uQ== 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 :date:subject:cc:to:from:dkim-signature; bh=+wcYTvY5S+UCp4ZM6lF9MNwYesqZrvxfyXKrJPscr4M=; fh=qAPe5qiEjGEI6PAB4iGo703ejtRIE8f07Uvyp/kzsRs=; b=Dv3mal+16ajzrA6sDktA673a5ORoAYpIHp70eRCZks/0K5hJFCHADUYUPQ1fTZbNaa d7IxHweMX/HTz8EZypMtiO5wlu1WmeHMztBwIkrAyhvv3/VT1VYQTM5mA8xCyNLpWJmg LJRz7Yq5MLP/9djFji1d/+sEXxqw4Yt+oByWpJwJSxOlv4/N8tDQslzn9VD/PjVGGiQI YynknRYyPYKLlpjgG6xJpLH3kFiCBnPLfjaDYOeNDEEvl7hohh/qrfbqKC7RX/JbTj6o 4k4yeMqhogvyHy1GOxCfLWwLpxRQlEF1rr3Z9OzzjZDScs9+7YRvDmOBQ/sq/aAA4oS7 HXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=Q+R50F5j; spf=pass (google.com: domain of linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e19-20020a05622a111300b0042992268779si4586321qty.665.2024.01.10.09.24.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=Q+R50F5j; spf=pass (google.com: domain of linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22526-ouuuleilei=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 776C11C22982 for <ouuuleilei@gmail.com>; Wed, 10 Jan 2024 17:24:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 074BE4E1D4; Wed, 10 Jan 2024 17:23:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=subdimension.ro header.i=@subdimension.ro header.b="Q+R50F5j" Received: from mail.subdimension.ro (skycaves.subdimension.ro [172.104.132.142]) (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 78AF24D105; Wed, 10 Jan 2024 17:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=subdimension.ro Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=subdimension.ro Received: from localhost.localdomain (unknown [188.24.94.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.subdimension.ro (Postfix) with ESMTPSA id 27AF6295116; Wed, 10 Jan 2024 17:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=subdimension.ro; s=skycaves; t=1704907393; bh=JR2K1BGHxcrEH+xlbeKvVMsrrRoi4/Miv25LV1xkXWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Q+R50F5jAAkGNV5MXSZqLkl4o0OpmvSKhAdLA4tRMfd/7asJONo/36bTmpWvHYbBE IouYktqbeh9Knwqp26O6aVbhSdp1mEexnlVj5CLq/BDwIpIFiSH1YRw2A7kujBWfp6 mKb2fmRzPhfw55g0Sxqk4BEEHL/WkwW8Y/z/3vMQ= From: Petre Rodan <petre.rodan@subdimension.ro> To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Petre Rodan <petre.rodan@subdimension.ro>, Jonathan Cameron <jic23@kernel.org>, Lars-Peter Clausen <lars@metafoo.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Subject: [PATCH 2/6] dt-bindings: iio: pressure: honeywell,hsc030pa.yaml add sleep-mode Date: Wed, 10 Jan 2024 19:22:37 +0200 Message-ID: <20240110172306.31273-3-petre.rodan@subdimension.ro> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240110172306.31273-1-petre.rodan@subdimension.ro> References: <20240110172306.31273-1-petre.rodan@subdimension.ro> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787725064562990515 X-GMAIL-MSGID: 1787725064562990515 |
Series |
iio: pressure: hsc030pa new features
|
|
Commit Message
Petre Rodan
Jan. 10, 2024, 5:22 p.m. UTC
Add sleep-mode property present in some custom chips.
This flag activates a special wakeup sequence prior to conversion.
Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
---
.../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
--
2.41.0
Comments
On 10/01/2024 18:22, Petre Rodan wrote: > Add sleep-mode property present in some custom chips. > > This flag activates a special wakeup sequence prior to conversion. > > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> > --- > .../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > index 89977b9f01cf..350da1d6991b 100644 > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > @@ -86,6 +86,15 @@ properties: > Maximum pressure value the sensor can measure in pascal. > To be specified only if honeywell,pressure-triplet is set to "NA". > > + honeywell,sleep-mode: "Sleep mode" naming suggests there are choices, like mode foo and mode bar. Probably you want something like "sleep-between-measurements" or something matching how does it work. > + description: | Do not need '|' unless you need to preserve formatting. > + 'Sleep Mode' is a special factory set mode of the chip that allows the > + sensor to power down between measurements. It is implemented only on > + special request, and it is an attribute not present in the HSC/SSC series > + nomenclature. > + Set in order to enable the special wakeup sequence prior to conversion. > + $ref: /schemas/types.yaml#/definitions/flag > + > vdd-supply: > description: > Provide VDD power to the sensor (either 3.3V or 5V depending on the chip) > @@ -140,6 +149,7 @@ examples: > honeywell,pressure-triplet = "NA"; > honeywell,pmin-pascal = <0>; > honeywell,pmax-pascal = <200000>; > + //honeywell,sleep-mode; Drop comment. > 2.41.0 > Best regards, Krzysztof
Hello Krzysztof, On Wed, Jan 10, 2024 at 09:48:34PM +0100, Krzysztof Kozlowski wrote: > On 10/01/2024 18:22, Petre Rodan wrote: > > Add sleep-mode property present in some custom chips. > > > > This flag activates a special wakeup sequence prior to conversion. > > > > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> > > --- > > .../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > index 89977b9f01cf..350da1d6991b 100644 > > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > @@ -86,6 +86,15 @@ properties: > > Maximum pressure value the sensor can measure in pascal. > > To be specified only if honeywell,pressure-triplet is set to "NA". > > > > + honeywell,sleep-mode: > > "Sleep mode" naming suggests there are choices, like mode foo and mode > bar. Probably you want something like "sleep-between-measurements" or > something matching how does it work. "sleep mode" is the terminology used by Honeywell and it defines a chip capability. it is present in the HSC/SSC and ABP series of ICs. other such options (capabilities) include temperature output in the ABP series. the action the driver needs to perform if this option is present is to provide a wake-up sequence before reading out the conversions. now regarding a rename of this property, I would vote to leave it as is - for the users to have a 1:1 equivalence of terms between the driver and the datasheet. I say that because for instance in circuit design when a part symbol and footprint is drawn based on a datasheet it is recommended to keep the same pin notations and the same block diagram as in the datasheet, precisely for this 1:1 equivalence, so there is no uncertainty for the end-user. cheers, peter > > > + description: | > > Do not need '|' unless you need to preserve formatting. > > > + 'Sleep Mode' is a special factory set mode of the chip that allows the > > + sensor to power down between measurements. It is implemented only on > > + special request, and it is an attribute not present in the HSC/SSC series > > + nomenclature. > > + Set in order to enable the special wakeup sequence prior to conversion. > > + $ref: /schemas/types.yaml#/definitions/flag > > + > > vdd-supply: > > description: > > Provide VDD power to the sensor (either 3.3V or 5V depending on the chip) > > @@ -140,6 +149,7 @@ examples: > > honeywell,pressure-triplet = "NA"; > > honeywell,pmin-pascal = <0>; > > honeywell,pmax-pascal = <200000>; > > + //honeywell,sleep-mode; > > Drop comment. > > > 2.41.0 > > > > Best regards, > Krzysztof >
On Fri, Jan 12, 2024 at 09:30:30AM +0200, Petre Rodan wrote: > > Hello Krzysztof, > > On Wed, Jan 10, 2024 at 09:48:34PM +0100, Krzysztof Kozlowski wrote: > > On 10/01/2024 18:22, Petre Rodan wrote: > > > Add sleep-mode property present in some custom chips. > > > > > > This flag activates a special wakeup sequence prior to conversion. > > > > > > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> > > > --- > > > .../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > index 89977b9f01cf..350da1d6991b 100644 > > > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > @@ -86,6 +86,15 @@ properties: > > > Maximum pressure value the sensor can measure in pascal. > > > To be specified only if honeywell,pressure-triplet is set to "NA". > > > > > > + honeywell,sleep-mode: > > > > "Sleep mode" naming suggests there are choices, like mode foo and mode > > bar. Probably you want something like "sleep-between-measurements" or > > something matching how does it work. > > "sleep mode" is the terminology used by Honeywell and it defines a chip capability. > it is present in the HSC/SSC and ABP series of ICs. > > other such options (capabilities) include temperature output in the ABP series. > > the action the driver needs to perform if this option is present is to provide a > wake-up sequence before reading out the conversions. > > now regarding a rename of this property, I would vote to leave it as is - for the > users to have a 1:1 equivalence of terms between the driver and the datasheet. > > I say that because for instance in circuit design when a part symbol and > footprint is drawn based on a datasheet it is recommended to keep the same pin > notations and the same block diagram as in the datasheet, precisely for this 1:1 > equivalence, so there is no uncertainty for the end-user. At least add a '-en' suffix so it is clear this property enables the mode. We have both flavors (enables and disables). Low power modes between samples is pretty common on these devices. We should consider if this should be a common property. Jonathan? Rob
On Tue, 16 Jan 2024 11:30:23 -0600 Rob Herring <robh@kernel.org> wrote: > On Fri, Jan 12, 2024 at 09:30:30AM +0200, Petre Rodan wrote: > > > > Hello Krzysztof, > > > > On Wed, Jan 10, 2024 at 09:48:34PM +0100, Krzysztof Kozlowski wrote: > > > On 10/01/2024 18:22, Petre Rodan wrote: > > > > Add sleep-mode property present in some custom chips. > > > > > > > > This flag activates a special wakeup sequence prior to conversion. > > > > > > > > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> > > > > --- > > > > .../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++ > > > > 1 file changed, 10 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > index 89977b9f01cf..350da1d6991b 100644 > > > > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > @@ -86,6 +86,15 @@ properties: > > > > Maximum pressure value the sensor can measure in pascal. > > > > To be specified only if honeywell,pressure-triplet is set to "NA". > > > > > > > > + honeywell,sleep-mode: > > > > > > "Sleep mode" naming suggests there are choices, like mode foo and mode > > > bar. Probably you want something like "sleep-between-measurements" or > > > something matching how does it work. > > > > "sleep mode" is the terminology used by Honeywell and it defines a chip capability. > > it is present in the HSC/SSC and ABP series of ICs. > > > > other such options (capabilities) include temperature output in the ABP series. > > > > the action the driver needs to perform if this option is present is to provide a > > wake-up sequence before reading out the conversions. > > > > now regarding a rename of this property, I would vote to leave it as is - for the > > users to have a 1:1 equivalence of terms between the driver and the datasheet. > > > > I say that because for instance in circuit design when a part symbol and > > footprint is drawn based on a datasheet it is recommended to keep the same pin > > notations and the same block diagram as in the datasheet, precisely for this 1:1 > > equivalence, so there is no uncertainty for the end-user. > > At least add a '-en' suffix so it is clear this property enables the > mode. We have both flavors (enables and disables). > > Low power modes between samples is pretty common on these devices. We > should consider if this should be a common property. Jonathan? Normally it's a controllable things so we make it dependent on userspace interaction (runtime-pm or whether buffered capture is enabled). Policy thing so not appropriate in DT. Here it's different because it's a particular device variant that must work in this fashion. Other device variants don't support it at all. If it weren't for the obscene number of variants this would normally be derived from the compatible rather than being in DT at all. So it's odd and I don't think appropriate for a common property. Jonathan > > Rob >
On Wed, Jan 17, 2024 at 04:50:01PM +0000, Jonathan Cameron wrote: > On Tue, 16 Jan 2024 11:30:23 -0600 > Rob Herring <robh@kernel.org> wrote: > > > On Fri, Jan 12, 2024 at 09:30:30AM +0200, Petre Rodan wrote: > > > > > > Hello Krzysztof, > > > > > > On Wed, Jan 10, 2024 at 09:48:34PM +0100, Krzysztof Kozlowski wrote: > > > > On 10/01/2024 18:22, Petre Rodan wrote: > > > > > Add sleep-mode property present in some custom chips. > > > > > > > > > > This flag activates a special wakeup sequence prior to conversion. > > > > > > > > > > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro> > > > > > --- > > > > > .../bindings/iio/pressure/honeywell,hsc030pa.yaml | 10 ++++++++++ > > > > > 1 file changed, 10 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > > index 89977b9f01cf..350da1d6991b 100644 > > > > > --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > > +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml > > > > > @@ -86,6 +86,15 @@ properties: > > > > > Maximum pressure value the sensor can measure in pascal. > > > > > To be specified only if honeywell,pressure-triplet is set to "NA". > > > > > > > > > > + honeywell,sleep-mode: > > > > > > > > "Sleep mode" naming suggests there are choices, like mode foo and mode > > > > bar. Probably you want something like "sleep-between-measurements" or > > > > something matching how does it work. > > > > > > "sleep mode" is the terminology used by Honeywell and it defines a chip capability. > > > it is present in the HSC/SSC and ABP series of ICs. > > > > > > other such options (capabilities) include temperature output in the ABP series. > > > > > > the action the driver needs to perform if this option is present is to provide a > > > wake-up sequence before reading out the conversions. > > > > > > now regarding a rename of this property, I would vote to leave it as is - for the > > > users to have a 1:1 equivalence of terms between the driver and the datasheet. > > > > > > I say that because for instance in circuit design when a part symbol and > > > footprint is drawn based on a datasheet it is recommended to keep the same pin > > > notations and the same block diagram as in the datasheet, precisely for this 1:1 > > > equivalence, so there is no uncertainty for the end-user. > > > > At least add a '-en' suffix so it is clear this property enables the > > mode. We have both flavors (enables and disables). > > > > Low power modes between samples is pretty common on these devices. We > > should consider if this should be a common property. Jonathan? > > Normally it's a controllable things so we make it dependent on userspace > interaction (runtime-pm or whether buffered capture is enabled). > Policy thing so not appropriate in DT. > > Here it's different because it's a particular device variant that must work in this > fashion. Other device variants don't support it at all. > > If it weren't for the obscene number of variants this would normally be > derived from the compatible rather than being in DT at all. > > So it's odd and I don't think appropriate for a common property. All good details missing from the description and commit msg. Given that, I retract my suggestion to use '-en' as it not a case of enabling the feature. Probably worth just keeping the name as-is than discussing further. Rob
diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml index 89977b9f01cf..350da1d6991b 100644 --- a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml @@ -86,6 +86,15 @@ properties: Maximum pressure value the sensor can measure in pascal. To be specified only if honeywell,pressure-triplet is set to "NA". + honeywell,sleep-mode: + description: | + 'Sleep Mode' is a special factory set mode of the chip that allows the + sensor to power down between measurements. It is implemented only on + special request, and it is an attribute not present in the HSC/SSC series + nomenclature. + Set in order to enable the special wakeup sequence prior to conversion. + $ref: /schemas/types.yaml#/definitions/flag + vdd-supply: description: Provide VDD power to the sensor (either 3.3V or 5V depending on the chip) @@ -140,6 +149,7 @@ examples: honeywell,pressure-triplet = "NA"; honeywell,pmin-pascal = <0>; honeywell,pmax-pascal = <200000>; + //honeywell,sleep-mode; }; }; ...