Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml
Extension
.yaml
Size
2504 bytes
Lines
97
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 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/afe/voltage-divider.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Voltage divider

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

description: |
  When an io-channel measures the midpoint of a voltage divider, the
  interesting voltage is often the voltage over the full resistance
  of the divider. This binding describes the voltage divider in such
  a circuit.

    Vin ----.
            |
         .-----.
         |  R  |
         '-----'
            |
            +---- Vout
            |
         .-----.
         | Rout|
         '-----'
            |
           GND

properties:
  compatible:
    const: voltage-divider

  io-channels:
    maxItems: 1
    description: |
      Channel node of a voltage io-channel.

  '#io-channel-cells':
    description:
      In addition to consuming the measurement services of a voltage
      output channel, the voltage divider can act as a provider of
      measurement services to other devices. This is particularly
      useful in scenarios wherein an ADC has an analog frontend,
      such as a voltage divider, and then consuming its raw value
      isn't interesting. In this case, the voltage before the divider
      is desired.
    const: 1

  output-ohms:
    description:
      Resistance Rout over which the output voltage is measured. See full-ohms.

  full-ohms:
    description:
      Resistance R + Rout for the full divider. The io-channel is scaled by
      the Rout / (R + Rout) quotient.

required:
  - compatible
  - io-channels
  - output-ohms
  - full-ohms

additionalProperties: false

examples:
  - |

Annotation

Implementation Notes