Message ID | 20231202041651.719963-1-alkuor@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1575711vqy; Fri, 1 Dec 2023 20:19:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVtmaDaTrkPuJalIn30uJoWGT7wpWU3mz5U26gROOqs4BFzHxaRoh075CxqxuGsj3SGnXE X-Received: by 2002:a17:90b:38c4:b0:286:58c5:b2c8 with SMTP id nn4-20020a17090b38c400b0028658c5b2c8mr788116pjb.23.1701490751475; Fri, 01 Dec 2023 20:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701490751; cv=none; d=google.com; s=arc-20160816; b=S8dfaQbyU3c8cD/M+YrqXKfO8u/BqIB/IpCJd0JeJgJTqWw5Ql5rYiwf3azfPpkcmC XzaOIn7Zaw3jMLu+3YO+T+JhibIu9I6nSefTvqwWlXJ/uqfTpUMt26ocmwr2SpvY+T/6 5dWZKNqhwI9Y5+0EmFLC9ZW3CveHQs4c6kO/0TOoF+eRCY9BJ64wb3Z9J0BbL4/ohuVY K85RFqXAg8NS8Vvin6zCj2oDzC9cnF7u4ZnH6mXi0dRW6juflhq7ZKLJSfGAEFSZyhLv 97bstWmRQytR7xqb23PHTCmisA6+G2GNIflUM1JJTT0SJ0g7zNWgGGSdztrjVxYvX9s8 V25Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ryqd5leIKr5+NNpeF4ac+2UCs1R3lcQgyQmfCPYM6S0=; fh=1M9teJ9lFSA1bQVb5IcYzX2P92x5JHU3I+d5Jz2DnzM=; b=fcOXoC2uSGGtbakk9vuA6KkkCq+Q8hkUrrKZkOTfZMP2gLBhEaORLS527Ue5vGp7P/ t/bacwSdIgtY2PiF3ackzSfJQElhMeRsrfx7x8WqekJ9HDw0vjDU2hKzkDAs/tvCQykI JZ5fDOGEfJFfHBIDSrLoY8IWRLAnGocyzHnXNr9RXHTr+Jloaq5wjdbUiUNb6Z1P2q5O ZI+9bDurFJomwz67m7/PS1UHqUsEz88v+7crp43BqMeYM3chgIULGaOGuly9lyvshXWK Wi1StkhH2w1OuXpJ/l+IwXFYc7LSqkX2za1iyB8La89g6CzP4A5Qgt5jsfDnBgSvEc1Y PCnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="J/CdPO14"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id nw4-20020a17090b254400b002856f3e5fe2si4793236pjb.3.2023.12.01.20.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 20:19:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="J/CdPO14"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4080081C50AE; Fri, 1 Dec 2023 20:18:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229537AbjLBESL (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Fri, 1 Dec 2023 23:18:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjLBESK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 1 Dec 2023 23:18:10 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B083F4; Fri, 1 Dec 2023 20:18:16 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-423c28db22eso32820111cf.1; Fri, 01 Dec 2023 20:18:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701490695; x=1702095495; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ryqd5leIKr5+NNpeF4ac+2UCs1R3lcQgyQmfCPYM6S0=; b=J/CdPO14apGG+XvDkfM7z1MSYysQjxBFk/BPtQ6K9FLBJC7oXti6377GYVd0Aw8XpR 3ndU0mF8XOvk6kBXMVdbp9Uot9tqrzFSsDPztOXZ5mtORGB4cqYJOUXrxYP+K5xM/X+S qy3zeLuSBTxu0IluP94TQMR2xoqIbrMaajwRn5kZNl66Z1BNUWS/jGyENd9GkoTsXy5d 6QcySqy4tFfYTNUd8VFcw4ByNaHj6JTsaayD12TWij1RcM2fdKnD9DRdrV7T2HrPyFnT z8tKCk2nhYjfIG1ZinvITmtF9ULBqak3+ArAb0ceYReIo6l/57bT0Pkro9wqKoe23LnT Zu2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701490695; x=1702095495; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ryqd5leIKr5+NNpeF4ac+2UCs1R3lcQgyQmfCPYM6S0=; b=doXAjFoT18QWjM+HFIVS8a1oNj1gQBwm5/L7hGnYKvHUUDdTjZWLH5gf3fNMkXNrb4 dSHeJesDDpyqiKZSYVLt12bXqyrzlztqzPz5s2CkNR2NsC504oe5sCCxMPvs4rCBs4sx YQq8KnRYqk8DNtA5hbPbSlb5PNqzAYTwsqCJXXmHFph1vJg0sJdFrsCYr4btbVHfMHen B+GYh35izZ3DzPN6OGtlqlXINZVShyZ+ra4jcOXSgbTTTdNIbEKRzUnFMWkSrI1BoEaC NXEpm1g63XQh3ySi8VrS28ftMs6lsL/k5nuaq3LR7MtBj15zoUIeeT8JuKOspnuNbWDg fQ+g== X-Gm-Message-State: AOJu0Yw0IleKmxnxC2BybdAbFxcHr5ASFZjmkO3qlbvgETFCdl5n2Xbv hxL2AR4BmHohdQ+8S17TqERzIIYx4J+SYg== X-Received: by 2002:a05:622a:514:b0:423:7255:3c7e with SMTP id l20-20020a05622a051400b0042372553c7emr861798qtx.17.1701490695022; Fri, 01 Dec 2023 20:18:15 -0800 (PST) Received: from localhost.localdomain (bras-base-ktnron0692w-grc-13-174-95-13-129.dsl.bell.ca. [174.95.13.129]) by smtp.gmail.com with ESMTPSA id g11-20020ac84dcb000000b0041818df8a0dsm2101485qtw.36.2023.12.01.20.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 20:18:14 -0800 (PST) From: Abdel Alkuor <alkuor@gmail.com> To: jic23@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: robh+dt@kernel.org, lars@metafoo.de, conor+dt@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Abdel Alkuor <alkuor@gmail.com> Subject: [PATCH v2 1/2] dt-bindings: iio: temperature: Add AMS AS6200 Date: Fri, 1 Dec 2023 23:16:50 -0500 Message-Id: <20231202041651.719963-1-alkuor@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 01 Dec 2023 20:18:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784142366170681627 X-GMAIL-MSGID: 1784142366170681627 |
Series |
[v2,1/2] dt-bindings: iio: temperature: Add AMS AS6200
|
|
Commit Message
Abdel Alkuor
Dec. 2, 2023, 4:16 a.m. UTC
as6200 is high accuracy temperature sensor of -/+ 0.4C degree
with a range between -40C to 125C degrees
Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
---
Changes in v2:
- Add vdd-supply
.../bindings/iio/temperature/ams,as6200.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml
Comments
On Fri, Dec 01, 2023 at 11:16:50PM -0500, Abdel Alkuor wrote: > as6200 is high accuracy temperature sensor of -/+ 0.4C degree Is +/- 0.4 degrees really "high accuracy"? > with a range between -40C to 125C degrees > > Signed-off-by: Abdel Alkuor <alkuor@gmail.com> > --- > Changes in v2: > - Add vdd-supply > > .../bindings/iio/temperature/ams,as6200.yaml | 49 +++++++++++++++++++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > > diff --git a/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > new file mode 100644 > index 000000000000..a1817795cdca > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/temperature/ams,as6200.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: AMS AS6200 Temperature Sensor > + > +maintainers: > + - Abdel Alkuor <alkuor@gmail.com> > + > +description: | Please add the text from your commit message (although perhaps dropping the "high accuracy" section) here. Otherwise, this looks okay to me. Thanks, Conor. > + https://ams.com/documents/20143/36005/AS6200_DS000449_4-00.pdf > + > +properties: > + compatible: > + const: ams,as6200 > + > + reg: > + maxItems: 1 > + > + vdd-supply: true > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - vdd-supply > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + temperature-sensor@48 { > + compatible = "ams,as6200"; > + reg = <0x48>; > + vdd-supply = <&vdd>; > + interrupt-parent = <&gpio1>; > + interrupts = <17 IRQ_TYPE_EDGE_BOTH>; > + }; > + }; > +... > -- > 2.34.1 >
On Sun, Dec 03, 2023 at 11:24:31AM +0000, Conor Dooley wrote: > On Fri, Dec 01, 2023 at 11:16:50PM -0500, Abdel Alkuor wrote: > > as6200 is high accuracy temperature sensor of -/+ 0.4C degree > Hi Conor, > Is +/- 0.4 degrees really "high accuracy"? > That's what the datasheet says :D. I'll remove it. > > with a range between -40C to 125C degrees > > > > Signed-off-by: Abdel Alkuor <alkuor@gmail.com> > > --- > > Changes in v2: > > - Add vdd-supply > > > > .../bindings/iio/temperature/ams,as6200.yaml | 49 +++++++++++++++++++ > > 1 file changed, 49 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > > new file mode 100644 > > index 000000000000..a1817795cdca > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml > > @@ -0,0 +1,49 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/temperature/ams,as6200.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: AMS AS6200 Temperature Sensor > > + > > +maintainers: > > + - Abdel Alkuor <alkuor@gmail.com> > > + > > +description: | > > Please add the text from your commit message (although perhaps dropping > the "high accuracy" section) here. > > Otherwise, this looks okay to me. Sounds good. Will add it in v3. > > Thanks, > Conor. > Thanks, Abdel > > + https://ams.com/documents/20143/36005/AS6200_DS000449_4-00.pdf > > + > > +properties: > > + compatible: > > + const: ams,as6200 > > + > > + reg: > > + maxItems: 1 > > + > > + vdd-supply: true > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - vdd-supply > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/irq.h> > > + i2c { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + temperature-sensor@48 { > > + compatible = "ams,as6200"; > > + reg = <0x48>; > > + vdd-supply = <&vdd>; > > + interrupt-parent = <&gpio1>; > > + interrupts = <17 IRQ_TYPE_EDGE_BOTH>; > > + }; > > + }; > > +... > > -- > > 2.34.1 > >
On Mon, 4 Dec 2023 21:19:22 -0500 Abdel Alkuor <alkuor@gmail.com> wrote: > On Sun, Dec 03, 2023 at 11:24:31AM +0000, Conor Dooley wrote: > > On Fri, Dec 01, 2023 at 11:16:50PM -0500, Abdel Alkuor wrote: > > > as6200 is high accuracy temperature sensor of -/+ 0.4C degree > > > Hi Conor, > > Is +/- 0.4 degrees really "high accuracy"? > > > That's what the datasheet says :D. I'll remove it. I'd not noticed this. Why is this an IIO driver rather than an hwmon one? Mostly we do that only for very high accuracy or weird temperature sensors (infrared ones for example or things with complex thermocouple handling). Simpler devices meant for hardware monitoring type applications typically go in hwmon. We have the iio to hwmon bridge driver for things that naturally have uses where IIO features are needed, but which get used for hwmon sometimes. Not sure this is enough IIO focused though, so perhaps list out why you think it should be in IIO? Jonathan
On Wed, Dec 06, 2023 at 05:40:50PM +0000, Jonathan Cameron wrote: > On Mon, 4 Dec 2023 21:19:22 -0500 > Abdel Alkuor <alkuor@gmail.com> wrote: > Hi Jonathan, > I'd not noticed this. Why is this an IIO driver rather than an hwmon one? > > Mostly we do that only for very high accuracy or weird temperature sensors > (infrared ones for example or things with complex thermocouple handling). > Simpler devices meant for hardware monitoring type applications typically go > in hwmon. > > We have the iio to hwmon bridge driver for things that naturally have uses > where IIO features are needed, but which get used for hwmon sometimes. > Not sure this is enough IIO focused though, so perhaps list out why you > think it should be in IIO? No specific reason. I thought IIO is the de facto for such sensors. I'll use hwmon instead. Thanks the clarification. Abdel
diff --git a/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml new file mode 100644 index 000000000000..a1817795cdca --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/ams,as6200.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/temperature/ams,as6200.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMS AS6200 Temperature Sensor + +maintainers: + - Abdel Alkuor <alkuor@gmail.com> + +description: | + https://ams.com/documents/20143/36005/AS6200_DS000449_4-00.pdf + +properties: + compatible: + const: ams,as6200 + + reg: + maxItems: 1 + + vdd-supply: true + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - vdd-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temperature-sensor@48 { + compatible = "ams,as6200"; + reg = <0x48>; + vdd-supply = <&vdd>; + interrupt-parent = <&gpio1>; + interrupts = <17 IRQ_TYPE_EDGE_BOTH>; + }; + }; +...