[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210607144718.1724413-9-liambeguin@gmail.com>
Date: Mon, 7 Jun 2021 10:47:18 -0400
From: Liam Beguin <liambeguin@...il.com>
To: liambeguin@...il.com, peda@...ntia.se, jic23@...nel.org,
lars@...afoo.de, pmeerw@...erw.net
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, robh+dt@...nel.org
Subject: [PATCH v2 8/8] dt-bindings: iio: afe: add binding for temperature-sense-amplifier
From: Liam Beguin <lvb@...hos.com>
An ADC is often used to measure other quantities indirectly. This
binding describe such a use case, the measurement of a temperature
through an analog front end connected to a voltage channel.
Signed-off-by: Liam Beguin <lvb@...hos.com>
---
.../iio/afe/temperature-sense-amplifier.yaml | 57 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 58 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/afe/temperature-sense-amplifier.yaml
diff --git a/Documentation/devicetree/bindings/iio/afe/temperature-sense-amplifier.yaml b/Documentation/devicetree/bindings/iio/afe/temperature-sense-amplifier.yaml
new file mode 100644
index 000000000000..08f97f052a91
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/afe/temperature-sense-amplifier.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/afe/temperature-sense-amplifier.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Temperature Sense Amplifier
+
+maintainers:
+ - Liam Beguin <lvb@...hos.com>
+
+description: |
+ When an io-channel measures the output voltage of a temperature analog front
+ end such as an RTD (resistance thermometer) or a temperature to current
+ sensor, the interesting measurement is almost always the corresponding
+ temperature, not the voltage output. This binding describes such a circuit.
+
+properties:
+ compatible:
+ const: temperature-sense-amplifier
+
+ io-channels:
+ maxItems: 1
+ description: |
+ Channel node of a voltage io-channel.
+
+ '#io-channel-cells':
+ const: 1
+
+ sense-gain-mult:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Amplifier gain multiplier. The default is <1>.
+
+ sense-gain-div:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Amplifier gain divider. The default is <1>.
+
+ sense-offset-millicelsius:
+ description: Amplifier offset. The default is <0>.
+
+additionalProperties: false
+required:
+ - compatible
+ - io-channels
+
+examples:
+ - |
+ pt1000_1: temperature-sensor {
+ compatible = "temperature-sense-amplifier";
+ #io-channel-cells = <1>;
+ io-channels = <&temp_adc 3>;
+
+ sense-gain-mult = <1000000>;
+ sense-gain-div = <3908>;
+ sense-offset-millicelsius = <(-255885)>;
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index e679d422b472..4f7b4ee9f19b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8887,6 +8887,7 @@ L: linux-iio@...r.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.yaml
F: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml
+F: Documentation/devicetree/bindings/iio/afe/temperature-sense-amplifier.yaml
F: Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
F: drivers/iio/afe/iio-rescale.c
--
2.30.1.489.g328c10930387
Powered by blists - more mailing lists