dt-bindings: iio: afe: add binding for current-sense-amplifier
authorPeter Rosin <peda@axentia.se>
Mon, 23 Apr 2018 21:08:08 +0000 (23:08 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Apr 2018 17:01:39 +0000 (18:01 +0100)
Similar to current sense shunts, but an amplifier enables the use
of a smaller sense resistance.

Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt [new file with mode: 0644]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt b/Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt
new file mode 100644 (file)
index 0000000..0ddbaeb
--- /dev/null
@@ -0,0 +1,26 @@
+Current Sense Amplifier
+=======================
+
+When an io-channel measures the output voltage from a current sense
+amplifier, the interesting mesaurement is almost always the current
+through the sense resistor, not the voltage output. This binding
+describes such a current sense circuit.
+
+Required properties:
+- compatible : "current-sense-amplifier"
+- io-channels : Channel node of a voltage io-channel.
+- sense-resistor-micro-ohms : The sense resistance in microohms.
+
+Optional properties:
+- sense-gain-mult: Amplifier gain multiplier. The default is <1>.
+- sense-gain-div: Amplifier gain divider. The default is <1>.
+
+Example:
+
+sysi {
+       compatible = "current-sense-amplifier";
+       io-channels = <&tiadc 0>;
+
+       sense-resistor-micro-ohms = <20000>;
+       sense-gain-mul = <50>;
+};
index 35987f6..d1c0f58 100644 (file)
@@ -6902,6 +6902,7 @@ IIO UNIT CONVERTER
 M:     Peter Rosin <peda@axentia.se>
 L:     linux-iio@vger.kernel.org
 S:     Maintained
+F:     Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt
 F:     Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt
 F:     Documentation/devicetree/bindings/iio/afe/voltage-divider.txt