xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunI/O channel multiplexer bindings
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunIf a multiplexer is used to select which hardware signal is fed to
4*4882a593Smuzhiyune.g. an ADC channel, these bindings describe that situation.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunRequired properties:
7*4882a593Smuzhiyun- compatible : "io-channel-mux"
8*4882a593Smuzhiyun- io-channels : Channel node of the parent channel that has multiplexed
9*4882a593Smuzhiyun		input.
10*4882a593Smuzhiyun- io-channel-names : Should be "parent".
11*4882a593Smuzhiyun- #address-cells = <1>;
12*4882a593Smuzhiyun- #size-cells = <0>;
13*4882a593Smuzhiyun- mux-controls : Mux controller node to use for operating the mux
14*4882a593Smuzhiyun- channels : List of strings, labeling the mux controller states.
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunFor each non-empty string in the channels property, an io-channel will
17*4882a593Smuzhiyunbe created. The number of this io-channel is the same as the index into
18*4882a593Smuzhiyunthe list of strings in the channels property, and also matches the mux
19*4882a593Smuzhiyuncontroller state. The mux controller state is described in
20*4882a593Smuzhiyun../mux/mux-controller.txt
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunExample:
23*4882a593Smuzhiyun	mux: mux-controller {
24*4882a593Smuzhiyun		compatible = "gpio-mux";
25*4882a593Smuzhiyun		#mux-control-cells = <0>;
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun		mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
28*4882a593Smuzhiyun			    <&pioA 1 GPIO_ACTIVE_HIGH>;
29*4882a593Smuzhiyun	};
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun	adc-mux {
32*4882a593Smuzhiyun		compatible = "io-channel-mux";
33*4882a593Smuzhiyun		io-channels = <&adc 0>;
34*4882a593Smuzhiyun		io-channel-names = "parent";
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun		mux-controls = <&mux>;
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun		channels = "sync", "in", "system-regulator";
39*4882a593Smuzhiyun	};
40