current-sense-shunt.txt 977 B

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