| Generic Voltage Divided ADC Battery | |
| ========================= | |
| In applications where a more sophisticated fuel gauge isn't available, | |
| a simple voltage divider circuit and an external ADC can be used to get | |
| the battery voltage. | |
| R1 R2 | |
| +------/\/\/\------+------/\/\/\------+ | |
| | | | | |
| Vbat Vadc GND | |
| Required Properties: | |
| ------------------- | |
| - compatible: "adc-div-battery" | |
| - io-channels: The phandle + io-specifier pair of the ADC [1] | |
| - divider-r1-ohm: The resistance of R1 in the divider circuit | |
| - divider-r2-ohm: The resistance of R2 in the divider circuit | |
| [1] See Documentation/devicetree/bindings/iio/iio-bindings.txt | |
| Example: | |
| battery { | |
| compatible = "adc-div-battery"; | |
| io-channels = <&adc1 3>; | |
| divider-r1-ohm = <100000>; | |
| divider-r2-ohm = <301000>; | |
| }; |