Re: [PATCH 1/2] dt-bindings: iio: afe: add binding for adi,lt6106
On Wed, Apr 11, 2018 at 04:15:54PM +0200, Peter Rosin wrote: > This is a current sense amplifier from Analog Devices. > > Signed-off-by: Peter Rosin> --- > .../devicetree/bindings/iio/afe/adi,lt6106.txt | 50 > ++ > MAINTAINERS| 1 + > 2 files changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > > diff --git a/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > new file mode 100644 > index ..98b6d93596f2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > @@ -0,0 +1,50 @@ > +LT6106 36V High Side Current Sence Amplifier > + > + > +This binding assumes the typical application of the current sense amplifier > +as described in the LT6106 datasheet. > + > +http://www.analog.com/media/en/technical-documentation/data-sheets/6106fb.pdf > + > + .--. > +Vin +--+-|Rsense|-+-. > +| | '--' | | > +| | | .---. > + .. .---.| | L | > + | V+| |Rin|| | O | > + || '---'| | A | > + ||| | | D | > + |-IN |' | '---' > +Vout ---+| OUT LT6106 | | | > +||+IN |---'GND > + .. || > + |Rout| || > + '' | V-| > +|'' > +| | > + GND GND > + > +The voltage Vsense over Rsense is measured by looking at Vout. They > +are related as Vout = Vsense * Rout / Rin. The current Isense through > +Rsense is (almost) the same as that through the LOAD. Hence, the > +interesting LOAD current can be calculated as > + > + Vout * Rin / (Rout * Rsense) > + > +Required properties: > +- compatible : "adi,lt6106" > +- io-channels : Channel node of an io-channel measuring Vout. > +- sense-resistor-micro-ohms : The Rsense resistance in microohms. > +- input-resistor-ohms : The Rin resistance in ohms. > +- output-resistor-ohms : The Rout resistance in ohms. Are these generic or specific to this binding? For the latter, they shoudl have vendor prefix. > + > +Example: > + > +sysi { > + compatible = "adi,lt6106"; > + io-channels = < 0>; > + > + sense-resistor-micro-ohms = <2>; > + input-resistor-ohms = <200>; > + output-resistor-ohms = <1>; > +};
Re: [PATCH 1/2] dt-bindings: iio: afe: add binding for adi,lt6106
On Wed, Apr 11, 2018 at 04:15:54PM +0200, Peter Rosin wrote: > This is a current sense amplifier from Analog Devices. > > Signed-off-by: Peter Rosin > --- > .../devicetree/bindings/iio/afe/adi,lt6106.txt | 50 > ++ > MAINTAINERS| 1 + > 2 files changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > > diff --git a/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > new file mode 100644 > index ..98b6d93596f2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt > @@ -0,0 +1,50 @@ > +LT6106 36V High Side Current Sence Amplifier > + > + > +This binding assumes the typical application of the current sense amplifier > +as described in the LT6106 datasheet. > + > +http://www.analog.com/media/en/technical-documentation/data-sheets/6106fb.pdf > + > + .--. > +Vin +--+-|Rsense|-+-. > +| | '--' | | > +| | | .---. > + .. .---.| | L | > + | V+| |Rin|| | O | > + || '---'| | A | > + ||| | | D | > + |-IN |' | '---' > +Vout ---+| OUT LT6106 | | | > +||+IN |---'GND > + .. || > + |Rout| || > + '' | V-| > +|'' > +| | > + GND GND > + > +The voltage Vsense over Rsense is measured by looking at Vout. They > +are related as Vout = Vsense * Rout / Rin. The current Isense through > +Rsense is (almost) the same as that through the LOAD. Hence, the > +interesting LOAD current can be calculated as > + > + Vout * Rin / (Rout * Rsense) > + > +Required properties: > +- compatible : "adi,lt6106" > +- io-channels : Channel node of an io-channel measuring Vout. > +- sense-resistor-micro-ohms : The Rsense resistance in microohms. > +- input-resistor-ohms : The Rin resistance in ohms. > +- output-resistor-ohms : The Rout resistance in ohms. Are these generic or specific to this binding? For the latter, they shoudl have vendor prefix. > + > +Example: > + > +sysi { > + compatible = "adi,lt6106"; > + io-channels = < 0>; > + > + sense-resistor-micro-ohms = <2>; > + input-resistor-ohms = <200>; > + output-resistor-ohms = <1>; > +};
[PATCH 1/2] dt-bindings: iio: afe: add binding for adi,lt6106
This is a current sense amplifier from Analog Devices. Signed-off-by: Peter Rosin--- .../devicetree/bindings/iio/afe/adi,lt6106.txt | 50 ++ MAINTAINERS| 1 + 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt diff --git a/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt new file mode 100644 index ..98b6d93596f2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt @@ -0,0 +1,50 @@ +LT6106 36V High Side Current Sence Amplifier + + +This binding assumes the typical application of the current sense amplifier +as described in the LT6106 datasheet. + +http://www.analog.com/media/en/technical-documentation/data-sheets/6106fb.pdf + + .--. +Vin +--+-|Rsense|-+-. +| | '--' | | +| | | .---. + .. .---.| | L | + | V+| |Rin|| | O | + || '---'| | A | + ||| | | D | + |-IN |' | '---' +Vout ---+| OUT LT6106 | | | +||+IN |---'GND + .. || + |Rout| || + '' | V-| +|'' +| | + GND GND + +The voltage Vsense over Rsense is measured by looking at Vout. They +are related as Vout = Vsense * Rout / Rin. The current Isense through +Rsense is (almost) the same as that through the LOAD. Hence, the +interesting LOAD current can be calculated as + + Vout * Rin / (Rout * Rsense) + +Required properties: +- compatible : "adi,lt6106" +- io-channels : Channel node of an io-channel measuring Vout. +- sense-resistor-micro-ohms : The Rsense resistance in microohms. +- input-resistor-ohms : The Rin resistance in ohms. +- output-resistor-ohms : The Rout resistance in ohms. + +Example: + +sysi { + compatible = "adi,lt6106"; + io-channels = < 0>; + + sense-resistor-micro-ohms = <2>; + input-resistor-ohms = <200>; + output-resistor-ohms = <1>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 21368749f3b0..76d1e03f350a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6893,6 +6893,7 @@ IIO UNIT CONVERTER M: Peter Rosin L: linux-...@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt F: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt F: Documentation/devicetree/bindings/iio/afe/voltage-divider.txt F: drivers/iio/afe/iio-unit-converter.c -- 2.11.0
[PATCH 1/2] dt-bindings: iio: afe: add binding for adi,lt6106
This is a current sense amplifier from Analog Devices. Signed-off-by: Peter Rosin --- .../devicetree/bindings/iio/afe/adi,lt6106.txt | 50 ++ MAINTAINERS| 1 + 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt diff --git a/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt new file mode 100644 index ..98b6d93596f2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt @@ -0,0 +1,50 @@ +LT6106 36V High Side Current Sence Amplifier + + +This binding assumes the typical application of the current sense amplifier +as described in the LT6106 datasheet. + +http://www.analog.com/media/en/technical-documentation/data-sheets/6106fb.pdf + + .--. +Vin +--+-|Rsense|-+-. +| | '--' | | +| | | .---. + .. .---.| | L | + | V+| |Rin|| | O | + || '---'| | A | + ||| | | D | + |-IN |' | '---' +Vout ---+| OUT LT6106 | | | +||+IN |---'GND + .. || + |Rout| || + '' | V-| +|'' +| | + GND GND + +The voltage Vsense over Rsense is measured by looking at Vout. They +are related as Vout = Vsense * Rout / Rin. The current Isense through +Rsense is (almost) the same as that through the LOAD. Hence, the +interesting LOAD current can be calculated as + + Vout * Rin / (Rout * Rsense) + +Required properties: +- compatible : "adi,lt6106" +- io-channels : Channel node of an io-channel measuring Vout. +- sense-resistor-micro-ohms : The Rsense resistance in microohms. +- input-resistor-ohms : The Rin resistance in ohms. +- output-resistor-ohms : The Rout resistance in ohms. + +Example: + +sysi { + compatible = "adi,lt6106"; + io-channels = < 0>; + + sense-resistor-micro-ohms = <2>; + input-resistor-ohms = <200>; + output-resistor-ohms = <1>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 21368749f3b0..76d1e03f350a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6893,6 +6893,7 @@ IIO UNIT CONVERTER M: Peter Rosin L: linux-...@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/iio/afe/adi,lt6106.txt F: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt F: Documentation/devicetree/bindings/iio/afe/voltage-divider.txt F: drivers/iio/afe/iio-unit-converter.c -- 2.11.0