Message ID | 2e8b4a7d3ef4bc1c53bd0a849e4c31eaf2477f6b.1700648165.git.cmo@melexis.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1225902vqb; Wed, 22 Nov 2023 02:31:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlLDcwLQzhJ3SD484H3TCfeGaW+uh8TG2f8I8y91k0wEBi2gw82OBzxEM51FUNb7vQlLCG X-Received: by 2002:a17:902:c1c4:b0:1cf:6e6f:3f9f with SMTP id c4-20020a170902c1c400b001cf6e6f3f9fmr1824173plc.44.1700649094194; Wed, 22 Nov 2023 02:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700649094; cv=none; d=google.com; s=arc-20160816; b=nXMVxOHYdUdyfowprNSKVqDx06x5j3lQdRhvd3S4tIiKarHyC8Y4gawV5KSKFU/Ko9 71RvV5hJsO6usbFCqkdx/Uh3YlO4VP4rnhKrO3ktpVBpoet98Y84BYVlV/E9u0+LkKDR pjyG5RvLRmQeLweZ/SEg2+7QnCYIXeMNy0DdHq5iPzERJIXnuQuga4v4DcvgUZ0P4sFL 4ymlftA+89iovlMVxAS8KFtXs7jVCMz72Vmm4/hQ7a5NHZd21gr8/P204WGbpgIZ+kzz rpRUVAsu3rY0UjiPypuAqxfrz38NPZ9D9uRo75eAGPbanpcB7dzfAKMLmlbGLrFRnB9K 5H9A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9feGrtgxkTxJbOa4Vk9//3jntNv3ytgoDCgss4YnGjI=; fh=B+IPMIUUreGZhzsEnOMCcV0+UcNpDtB/JxPc4z9Wstg=; b=FqjdWIFuTd+yq09raMREQHDI5+463zMo2F2iIqd0w+3O9HjLq/VWBq1YGrBmC8Vh50 t9vSluSwkhKGGOskxZ3MfTjzGPEk43HnzbZZ0EIxpc3NAE6YmbRE6wo1pGa9BQO7ZYJk 1IwEkOjeMfnh9Ti/pnMFBlHRxX0VZsdJy7ahl22dOtXANMjZhsX9oMqAaqWOviE+lSBw DhwzJPJTaYsZXZ/6j7lrUA71KGk7r5y4/oVm4q6Ydj0T+XUlWV/Dki5V2tRKNU5B1zzb b1bnZepsNQZbmjnBt2CKFoLRv4ZdMPvWE3pNH/Hu7QELk7AonCpww0sa7CvPpr4kmvw/ oIZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@melexis.com header.s=google header.b=VKlD7j4R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=melexis.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n12-20020a170902d2cc00b001cf5d4fb9f8si7048610plc.234.2023.11.22.02.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 02:31:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@melexis.com header.s=google header.b=VKlD7j4R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=melexis.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EA49D807C569; Wed, 22 Nov 2023 02:30:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230225AbjKVKaG (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 05:30:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjKVKaE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 05:30:04 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 816CD91 for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 02:30:00 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-4083f613275so32891355e9.2 for <linux-kernel@vger.kernel.org>; Wed, 22 Nov 2023 02:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=melexis.com; s=google; t=1700648999; x=1701253799; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9feGrtgxkTxJbOa4Vk9//3jntNv3ytgoDCgss4YnGjI=; b=VKlD7j4Re7x3tqxi5gIkYaSAWb5ySw/SImzpHTNtNgiY5sPl1GZFWDyx8Rs7at642w XAQ/wVby+EjOnEcn2q8wQdMvipBqUUhG+qNFLGsu91rOn+Xw+fr4Z+5p+Z/T8KelNAqW /d2qXZrRymqFp1S7T4xSLQiVB4PZdx6hgUkMHCUyxmk+Lz03hOP97GFPnLg3C66uEpSt vILpg7TkUHZzUdS4cuEET8Iq2nLXOMVRH29j0bg9PS79yEkFhGpG4+OemKEixpxIK+c2 lGnNNVvk969jhy3wDTTB1ifllCvlsUfm4JagdZeNqitU4zFQ6LTQmy/PZySYs0BbmJwa e3KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700648999; x=1701253799; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9feGrtgxkTxJbOa4Vk9//3jntNv3ytgoDCgss4YnGjI=; b=qyn+jZabBqu+kr/LNKC9vz1NRHvzjBPKWGTIAdmy6DM0mS+DwQK/o1VVtPeo0BDIsx +q4/rBmA4eGRK075db+6GjMYF0ztwEfN1DQHrXvS1iBogDhb+EQIzAGvhpQ5S++QKU+D fiK/YlkgUbetiXEqWkP5Tklc6VwDeohh+jqMdzMS618ZsoML0lNoXgj8u2jR5UcMLqpX HdynOjcqKjyUSV4kuRPiP/F4E2RZ+vCjp7kp63dBMic73Ij2TCmhtII8BHk4FtLzjZ/S cCZVtiEHT0MI72EA2soHDAEX3ff8RRXSt3fR72Q55DjvaC2gwZFJYL0/M3vsV7Iqpdo4 XLQg== X-Gm-Message-State: AOJu0YzC11CGtQAFXX9+ENbfFXiT3flkUKUKDIXYNwwA77UdMFSVJ4/u nnMCZwP6lOM2Ndqu81mrhOp9IQ== X-Received: by 2002:a5d:6d8f:0:b0:32f:92f3:dbbb with SMTP id l15-20020a5d6d8f000000b0032f92f3dbbbmr951901wrs.70.1700648998902; Wed, 22 Nov 2023 02:29:58 -0800 (PST) Received: from localhost.localdomain (d54C3956F.access.telenet.be. [84.195.149.111]) by smtp.gmail.com with ESMTPSA id f12-20020adff44c000000b003313e4dddecsm16652786wrp.108.2023.11.22.02.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 02:29:58 -0800 (PST) From: Crt Mori <cmo@melexis.com> To: Jonathan Cameron <jic23@kernel.org>, Rob Herring <robh+dt@kernel.org> Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Crt Mori <cmo@melexis.com> Subject: [PATCH 2/2] dt-bindings: iio: temperature: add MLX90635 device bindings Date: Wed, 22 Nov 2023 11:27:21 +0100 Message-Id: <2e8b4a7d3ef4bc1c53bd0a849e4c31eaf2477f6b.1700648165.git.cmo@melexis.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <cover.1700648164.git.cmo@melexis.com> References: <cover.1700648164.git.cmo@melexis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 02:30:14 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783259824579255671 X-GMAIL-MSGID: 1783259824579255671 |
Series |
iio: temperature: mlx90635 Driver for MLX90635 IR temperature sensor
|
|
Commit Message
Crt Mori
Nov. 22, 2023, 10:27 a.m. UTC
Add device tree bindings for MLX90635 Infra Red contactless temperature
sensor.
Signed-off-by: Crt Mori <cmo@melexis.com>
---
.../iio/temperature/melexis,mlx90635.yaml | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml
Comments
On 22/11/2023 11:27, Crt Mori wrote: > Add device tree bindings for MLX90635 Infra Red contactless temperature > sensor. Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC (and consider --no-git-fallback argument). It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel. A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. > > Signed-off-by: Crt Mori <cmo@melexis.com> > --- > .../iio/temperature/melexis,mlx90635.yaml | 60 +++++++++++++++++++ > 1 file changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > > diff --git a/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > new file mode 100644 > index 000000000000..96463121a806 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/temperature/melexis,mlx90635.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Melexis MLX90635 contactless Infra Red temperature sensor > + > +maintainers: > + - Crt Mori <cmo@melexis.com> > + > +description: | > + https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90635 > + > + There are various applications for the Infra Red contactless temperature > + sensor and MLX90635 is most suitable for consumer applications where > + measured object temperature is in range between -20 to 100 degrees > + Celsius with relative error of measurement 2 degree Celsius in > + object temperature range for industrial applications, while just 0.2 > + degree Celsius for human body measurement applications. Since it can > + operate and measure ambient temperature in range of -20 to 85 degrees > + Celsius it is suitable also for outdoor use. > + > + Be aware that electronics surrounding the sensor can increase ambient > + temperature. MLX90635 can be calibrated to reduce the housing effect via > + already existing EEPROM parameters. > + > + Since measured object emissivity effects Infra Red energy emitted, > + emissivity should be set before requesting the object temperature. > + > +properties: > + compatible: > + const: melexis,mlx90635 It's the same as mlx90632. Add it there (as enum). Best regards, Krzysztof
On Wed, 22 Nov 2023 at 12:52, Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On 22/11/2023 11:27, Crt Mori wrote: > > Add device tree bindings for MLX90635 Infra Red contactless temperature > > sensor. > > Please use scripts/get_maintainers.pl to get a list of necessary people > and lists to CC (and consider --no-git-fallback argument). It might > happen, that command when run on an older kernel, gives you outdated > entries. Therefore please be sure you base your patches on recent Linux > kernel. > OK, will put everyone in that list in next spin. > A nit, subject: drop second/last, redundant "bindings". The > "dt-bindings" prefix is already stating that these are bindings. > Ok, will fix that in next version (probably main driver review will get some comments). > > > > Signed-off-by: Crt Mori <cmo@melexis.com> > > --- > > .../iio/temperature/melexis,mlx90635.yaml | 60 +++++++++++++++++++ > > 1 file changed, 60 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > > new file mode 100644 > > index 000000000000..96463121a806 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml > > @@ -0,0 +1,60 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/temperature/melexis,mlx90635.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Melexis MLX90635 contactless Infra Red temperature sensor > > + > > +maintainers: > > + - Crt Mori <cmo@melexis.com> > > + > > +description: | > > + https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90635 > > + > > + There are various applications for the Infra Red contactless temperature > > + sensor and MLX90635 is most suitable for consumer applications where > > + measured object temperature is in range between -20 to 100 degrees > > + Celsius with relative error of measurement 2 degree Celsius in > > + object temperature range for industrial applications, while just 0.2 > > + degree Celsius for human body measurement applications. Since it can > > + operate and measure ambient temperature in range of -20 to 85 degrees > > + Celsius it is suitable also for outdoor use. > > + > > + Be aware that electronics surrounding the sensor can increase ambient > > + temperature. MLX90635 can be calibrated to reduce the housing effect via > > + already existing EEPROM parameters. > > + > > + Since measured object emissivity effects Infra Red energy emitted, > > + emissivity should be set before requesting the object temperature. > > + > > +properties: > > + compatible: > > + const: melexis,mlx90635 > > It's the same as mlx90632. Add it there (as enum). > Properties are the same, but then you can't have much differences for a temperature sensor. It has a bit worse relative measurement error outside of the human body range and overall different DSP, register map, even physical size - it's 1.8x1.8 mm compared to 90632 3x3 mm. I was not sure how it qualifies for adding it as another enum, but I went with the feeling that if it can reuse the driver, then it is an enum, otherwise it is a new file. And I could not reuse anything from 90632. Thanks for quick feedback and best regards, Crt > Best regards, > Krzysztof >
On 22/11/2023 13:28, Crt Mori wrote: >>> + Since measured object emissivity effects Infra Red energy emitted, >>> + emissivity should be set before requesting the object temperature. >>> + >>> +properties: >>> + compatible: >>> + const: melexis,mlx90635 >> >> It's the same as mlx90632. Add it there (as enum). >> > > Properties are the same, but then you can't have much differences for > a temperature sensor. It has a bit worse relative measurement error > outside of the human body range and overall different DSP, register > map, even physical size - it's 1.8x1.8 mm compared to 90632 3x3 mm. I > was not sure how it qualifies for adding it as another enum, but I > went with the feeling that if it can reuse the driver, then it is an > enum, otherwise it is a new file. And I could not reuse anything from > 90632. > > Thanks for quick feedback and best regards, Driver is independent choice. There is no need for new binding file if everything is the same from bindings point of view. Best regards, Krzysztof
On Wed, 22 Nov 2023 13:35:19 +0100 Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 22/11/2023 13:28, Crt Mori wrote: > >>> + Since measured object emissivity effects Infra Red energy emitted, > >>> + emissivity should be set before requesting the object temperature. > >>> + > >>> +properties: > >>> + compatible: > >>> + const: melexis,mlx90635 > >> > >> It's the same as mlx90632. Add it there (as enum). > >> > > > > Properties are the same, but then you can't have much differences for > > a temperature sensor. It has a bit worse relative measurement error > > outside of the human body range and overall different DSP, register > > map, even physical size - it's 1.8x1.8 mm compared to 90632 3x3 mm. I > > was not sure how it qualifies for adding it as another enum, but I > > went with the feeling that if it can reuse the driver, then it is an > > enum, otherwise it is a new file. And I could not reuse anything from > > 90632. > > > > Thanks for quick feedback and best regards, > > Driver is independent choice. There is no need for new binding file if > everything is the same from bindings point of view. > > Best regards, > Krzysztof > > We got this wrong in the past in IIO and it's a slow effort to merge the various very similar bindings. For now we are mostly keeping to within a vendor though unless a driver supports parts from multiple vendors. It potentially gets too confusing to maintain otherwise. This one is easy case though so definitely merge as Krzystof suggested! Jonathan
diff --git a/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml new file mode 100644 index 000000000000..96463121a806 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/melexis,mlx90635.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/temperature/melexis,mlx90635.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Melexis MLX90635 contactless Infra Red temperature sensor + +maintainers: + - Crt Mori <cmo@melexis.com> + +description: | + https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90635 + + There are various applications for the Infra Red contactless temperature + sensor and MLX90635 is most suitable for consumer applications where + measured object temperature is in range between -20 to 100 degrees + Celsius with relative error of measurement 2 degree Celsius in + object temperature range for industrial applications, while just 0.2 + degree Celsius for human body measurement applications. Since it can + operate and measure ambient temperature in range of -20 to 85 degrees + Celsius it is suitable also for outdoor use. + + Be aware that electronics surrounding the sensor can increase ambient + temperature. MLX90635 can be calibrated to reduce the housing effect via + already existing EEPROM parameters. + + Since measured object emissivity effects Infra Red energy emitted, + emissivity should be set before requesting the object temperature. + +properties: + compatible: + const: melexis,mlx90635 + + reg: + maxItems: 1 + description: Default is 0x3a, but can be reprogrammed. + + vdd-supply: + description: provide VDD power to the sensor (check datasheet for voltage). + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temp-sensor@3a { + compatible = "melexis,mlx90635"; + reg = <0x3a>; + vdd-supply = <&ldo4_reg>; + }; + }; +...