Path: blob/master/Documentation/devicetree/bindings/iio/adc/envelope-detector.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/adc/envelope-detector.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: ADC envelope detector using a DAC and a comparator78maintainers:9- Peter Rosin <peda@axentia.se>1011description: |12The DAC is used to find the peak level of an alternating voltage input13signal by a binary search using the output of a comparator wired to14an interrupt pin. Like so:15_16| \17input +------>-------|+ \18| \19.-------. | }---.20| | | / |21| dac|-->--|- / |22| | |_/ |23| | |24| | |25| irq|------<-------'26| |27'-------'2829properties:30compatible:31const: axentia,tse850-envelope-detector3233io-channels:34maxItems: 135description: Channel node of the dac to be used for comparator input.3637io-channel-names:38const: dac3940interrupts:41maxItems: 14243interrupt-names:44const: comp4546required:47- compatible48- io-channels49- io-channel-names50- interrupts51- interrupt-names5253additionalProperties: false5455examples:56- |57#include <dt-bindings/interrupt-controller/irq.h>58i2c {59#address-cells = <1>;60#size-cells = <0>;61dpot: dpot@28 {62compatible = "microchip,mcp4651-104";63reg = <0x28>;64#io-channel-cells = <1>;65};66};6768dac: dac {69compatible = "dpot-dac";70vref-supply = <®_3v3>;71io-channels = <&dpot 0>;72io-channel-names = "dpot";73#io-channel-cells = <1>;74};7576envelope-detector {77compatible = "axentia,tse850-envelope-detector";78io-channels = <&dac 0>;79io-channel-names = "dac";8081interrupt-parent = <&gpio>;82interrupts = <3 IRQ_TYPE_EDGE_FALLING>;83interrupt-names = "comp";84};85...868788