Documentation/devicetree/bindings/mux/gpio-mux.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/mux/gpio-mux.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/mux/gpio-mux.yaml
Extension
.yaml
Size
2153 bytes
Lines
104
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mux/gpio-mux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GPIO-based multiplexer controller

maintainers:
  - Peter Rosin <peda@axentia.se>

description: |+
  Define what GPIO pins are used to control a multiplexer. Or several
  multiplexers, if the same pins control more than one multiplexer.

  The multiplexer state is defined as the number represented by the
  multiplexer GPIO pins, where the first pin is the least significant
  bit. An active pin is a binary 1, an inactive pin is a binary 0.

properties:
  compatible:
    const: gpio-mux

  mux-gpios:
    description:
      List of gpios used to control the multiplexer, least significant bit first.

  mux-supply:
    description:
      Regulator to power on the multiplexer.

  '#mux-control-cells':
    enum: [ 0, 1 ]

  '#mux-state-cells':
    enum: [ 1, 2 ]

  idle-state:
    default: -1

required:
  - compatible
  - mux-gpios
anyOf:
  - required:
      - "#mux-control-cells"
  - required:
      - "#mux-state-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    mux: mux-controller {
        compatible = "gpio-mux";
        #mux-control-cells = <0>;

        mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
              <&pioA 1 GPIO_ACTIVE_HIGH>;
    };

    adc-mux {
        compatible = "io-channel-mux";
        io-channels = <&adc 0>;
        io-channel-names = "parent";

        mux-controls = <&mux>;

Annotation

Implementation Notes