ADC envelope detector using a DAC and a comparator

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/envelope-detector.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Peter Rosin <peda@axentia.se>"

The DAC is used to find the peak level of an alternating voltage input
signal by a binary search using the output of a comparator wired to
an interrupt pin. Like so:
                        _
                       | \
  input +------>-------|+ \
                       |   \
         .-------.     |    }---.
         |       |     |   /    |
         |    dac|-->--|- /     |
         |       |     |_/      |
         |       |              |
         |       |              |
         |    irq|------<-------'
         |       |
         '-------'

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "axentia,tse850-envelope-detector"

io-channels — required here #

Maximum number of items (maxItems): 1

Channel node of the dac to be used for comparator input.

io-channel-names — required here #

Exact value (const): "dac"

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-names — required here #

Exact value (const): "comp"

Required in this object (required): "compatible", "io-channels", "io-channel-names", "interrupts", "interrupt-names"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
i2c {
    #address-cells = <1>;
    #size-cells = <0>;
    dpot: dpot@28 {
        compatible = "microchip,mcp4651-104";
        reg = <0x28>;
        #io-channel-cells = <1>;
    };
};

dac: dac {
    compatible = "dpot-dac";
    vref-supply = <&reg_3v3>;
    io-channels = <&dpot 0>;
    io-channel-names = "dpot";
    #io-channel-cells = <1>;
};

envelope-detector {
    compatible = "axentia,tse850-envelope-detector";
    io-channels = <&dac 0>;
    io-channel-names = "dac";

    interrupt-parent = <&gpio>;
    interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
    interrupt-names = "comp";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page