Thread (21 messages) 21 messages, 4 authors, 2021-06-11
STALE1818d
Revisions (15)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v10 [diff vs current]
  11. v11 [diff vs current]
  12. v12 [diff vs current]
  13. v13 [diff vs current]
  14. v14 [diff vs current]
  15. v15 [diff vs current]

[PATCH v2 8/8] dt-bindings: iio: afe: add binding for temperature-sense-amplifier

From: Liam Beguin <hidden>
Date: 2021-06-07 14:48:40
Also in: linux-iio, lkml
Subsystem: iio subsystem and drivers, open firmware and flattened device tree bindings, the rest · Maintainers: Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds

From: Liam Beguin <redacted>

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 <redacted>
---
 .../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@xiphos.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@vger.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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help