linux/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.yaml

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/sigma-delta-modulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Sigma delta modulator

maintainers:
  - Arnaud Pouliquen <[email protected]>

properties:
  compatible:
    description: |
      "sd-modulator" can be used as a generic SD modulator,
      if the modulator is not specified in the compatible list.
    enum:
      - sd-modulator
      - ads1201

  '#io-backend-cells':
    const: 0

  '#io-channel-cells':
    const: 0

  vref-supply:
    description: Phandle to the vref input analog reference voltage.

dependencies:
  vref-supply: [ '#io-backend-cells' ]

required:
  - compatible

anyOf:
  - required: ['#io-backend-cells']
  - required: ['#io-channel-cells']

additionalProperties: false

examples:
  - |
    // Backend binding example. SD modulator configured as an IIO backend device
    ads1201_0: adc {
      compatible = "sd-modulator";
      vref-supply = <&vdd_adc>;
      #io-backend-cells = <0>;
    };

  - |
    // Legacy binding example. SD modulator configured as an IIO channel provider
    ads1201_1: adc {
      compatible = "sd-modulator";
      #io-channel-cells = <0>;
    };

...