xref: /freebsd/sys/contrib/device-tree/Bindings/iio/afe/current-sense-shunt.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1Current Sense Shunt
2===================
3
4When an io-channel measures the voltage over a current sense shunt,
5the interesting measurement is almost always the current through the
6shunt, not the voltage over it. This binding describes such a current
7sense circuit.
8
9Required properties:
10- compatible : "current-sense-shunt"
11- io-channels : Channel node of a voltage io-channel.
12- shunt-resistor-micro-ohms : The shunt resistance in microohms.
13
14Example:
15The system current is measured by measuring the voltage over a
163.3 ohms shunt resistor.
17
18sysi {
19	compatible = "current-sense-shunt";
20	io-channels = <&tiadc 0>;
21
22	/* Divide the voltage by 3300000/1000000 (or 3.3) for the current. */
23	shunt-resistor-micro-ohms = <3300000>;
24};
25
26&i2c {
27	tiadc: adc@48 {
28		compatible = "ti,ads1015";
29		reg = <0x48>;
30		#io-channel-cells = <1>;
31
32		#address-cells = <1>;
33		#size-cells = <0>;
34
35		channel@0 { /* IN0,IN1 differential */
36			reg = <0>;
37			ti,gain = <1>;
38			ti,datarate = <4>;
39		};
40	};
41};
42