TI ADS7924 4 channels 12 bits I2C analog to digital converter

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/ti,ads7924.yaml#"

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

Maintainers (maintainers): "Hugo Villeneuve <hvilleneuve@dimonoff.com>"

Texas Instruments ADS7924 4 channels 12 bits I2C analog to digital converter

Specifications:
  https://www.ti.com/lit/gpn/ads7924

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "ti,ads7924"

reg — required here #

Maximum number of items (maxItems): 1

vref-supply — required here #

The regulator supply for the ADC reference voltage (AVDD)

reset-gpios — not listed as required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

#io-channel-cells — not listed as required here #

Exact value (const): 1

Properties matching a name pattern (patternProperties) #

^channel@[0-3]+$ — name matches this regular expression #

Shared schema rule ($ref): adc.yaml

Represents the external channels which are connected to the ADC.

Properties and child nodes (properties) #

reg — required here

The channel number. It can have up to 4 channels numbered from 0 to 3.

Array item rules (items)

Item 1

Minimum value (minimum): 0

Maximum value (maximum): 3

label — not listed as required here

true — No constraints added by this property rule.

Required in this object (required): "reg"

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

false

Not allowed by this rule.

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

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "vref-supply", "#address-cells", "#size-cells"

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    adc@48 {
        compatible = "ti,ads7924";
        reg = <0x48>;
        vref-supply = <&ads7924_reg>;
        reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
        interrupt-parent = <&gpio>;
        #address-cells = <1>;
        #size-cells = <0>;
        channel@0 {
            reg = <0>;
            label = "CH0";
        };
        channel@1 {
            reg = <1>;
            label = "CH1";
        };
        channel@2 {
            reg = <2>;
            label = "CH2";
        };
        channel@3 {
            reg = <3>;
            label = "CH3";
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page