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