qcom,spmi-iadc.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Qualcomm's SPMI PMIC current ADC
  2. QPNP PMIC current ADC (IADC) provides interface to clients to read current.
  3. A 16 bit ADC is used for current measurements. IADC can measure the current
  4. through an external resistor (channel 1) or internal (built-in) resistor
  5. (channel 0). When using an external resistor it is to be described by
  6. qcom,external-resistor-micro-ohms property.
  7. IADC node:
  8. - compatible:
  9. Usage: required
  10. Value type: <string>
  11. Definition: Should contain "qcom,spmi-iadc".
  12. - reg:
  13. Usage: required
  14. Value type: <prop-encoded-array>
  15. Definition: IADC base address and length in the SPMI PMIC register map
  16. - interrupts:
  17. Usage: optional
  18. Value type: <prop-encoded-array>
  19. Definition: End of ADC conversion.
  20. - qcom,external-resistor-micro-ohms:
  21. Usage: optional
  22. Value type: <u32>
  23. Definition: Sense resister value in micro Ohm.
  24. If not defined value of 10000 micro Ohms will be used.
  25. Example:
  26. /* IADC node */
  27. pmic_iadc: iadc@3600 {
  28. compatible = "qcom,spmi-iadc";
  29. reg = <0x3600 0x100>;
  30. interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
  31. qcom,external-resistor-micro-ohms = <10000>;
  32. #io-channel-cells = <1>;
  33. };
  34. /* IIO client node */
  35. bat {
  36. io-channels = <&pmic_iadc 0>;
  37. io-channel-names = "iadc";
  38. };