Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/multiplexer/io-channel-mux.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: I/O channel multiplexer bindings
0008 
0009 maintainers:
0010   - Peter Rosin <peda@axentia.se>
0011 
0012 description: |
0013   If a multiplexer is used to select which hardware signal is fed to
0014   e.g. an ADC channel, these bindings describe that situation.
0015 
0016   For each non-empty string in the channels property, an io-channel will be
0017   created. The number of this io-channel is the same as the index into the list
0018   of strings in the channels property, and also matches the mux controller
0019   state. The mux controller state is described in
0020   Documentation/devicetree/bindings/mux/mux-controller.yaml
0021 
0022 properties:
0023 
0024   compatible:
0025     const: io-channel-mux
0026 
0027   io-channels:
0028     maxItems: 1
0029     description: Channel node of the parent channel that has multiplexed input.
0030 
0031   io-channel-names:
0032     const: parent
0033 
0034   mux-controls: true
0035   mux-control-names: true
0036 
0037   channels:
0038     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
0039     description:
0040       List of strings, labeling the mux controller states. An empty
0041       string for a state means that the channel is not available.
0042 
0043   settle-time-us:
0044     default: 0
0045     description:
0046       Time required for analog signals to settle after muxing.
0047 
0048   "#io-channel-cells":
0049     const: 1
0050 
0051 required:
0052   - compatible
0053   - io-channels
0054   - io-channel-names
0055   - mux-controls
0056   - channels
0057 
0058 additionalProperties: false
0059 
0060 examples:
0061   - |
0062     #include <dt-bindings/gpio/gpio.h>
0063     mux: mux-controller {
0064       compatible = "gpio-mux";
0065       #mux-control-cells = <0>;
0066 
0067       mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
0068                   <&pioA 1 GPIO_ACTIVE_HIGH>;
0069     };
0070 
0071     adc-mux {
0072       compatible = "io-channel-mux";
0073       io-channels = <&adc 0>;
0074       io-channel-names = "parent";
0075 
0076       mux-controls = <&mux>;
0077       channels = "sync", "in", "system-regulator";
0078     };
0079 ...