1Voltage divider
2===============
3
4When an io-channel measures the midpoint of a voltage divider, the
5interesting voltage is often the voltage over the full resistance
6of the divider. This binding describes the voltage divider in such
7a curcuit.
8
9    Vin ----.
10            |
11         .-----.
12         |  R  |
13         '-----'
14            |
15            +---- Vout
16            |
17         .-----.
18         | Rout|
19         '-----'
20            |
21           GND
22
23Required properties:
24- compatible : "voltage-divider"
25- io-channels : Channel node of a voltage io-channel measuring Vout.
26- output-ohms : Resistance Rout over which the output voltage is measured.
27	        See full-ohms.
28- full-ohms : Resistance R + Rout for the full divider. The io-channel
29	      is scaled by the Rout / (R + Rout) quotient.
30
31Example:
32The system voltage is circa 12V, but divided down with a 22/222
33voltage divider (R = 200 Ohms, Rout = 22 Ohms) and fed to an ADC.
34
35sysv {
36	compatible = "voltage-divider";
37	io-channels = <&maxadc 1>;
38
39	/* Scale the system voltage by 22/222 to fit the ADC range. */
40	output-ohms = <22>;
41	full-ohms = <222>; /* 200 + 22 */
42};
43
44&spi {
45	maxadc: adc@0 {
46		compatible = "maxim,max1027";
47		reg = <0>;
48		#io-channel-cells = <1>;
49		interrupt-parent = <&gpio5>;
50		interrupts = <15 IRQ_TYPE_EDGE_RISING>;
51		spi-max-frequency = <1000000>;
52	};
53};
54