Qualcomm's SPMI PMIC current ADC

Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/qcom,spmi-iadc.yaml#"

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

Maintainers (maintainers): "Jonathan Cameron <jic23@kernel.org>"

QPNP PMIC current ADC (IADC) provides interface to clients to read current. A 16 bit ADC is used for current measurements. IADC can measure the current through an external resistor (channel 1) or internal (built-in) resistor (channel 0). When using an external resistor it is to be described by qcom,external-resistor-micro-ohms property.

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "qcom,pm8226-iadc", "qcom,pm8941-iadc"

Item 2

Exact value (const): "qcom,spmi-iadc"

reg — required here #

IADC base address in the SPMI PMIC register map

Maximum number of items (maxItems): 1

qcom,external-resistor-micro-ohms — not listed as required here #

Sensor resistor value. If not defined value of 10000 micro Ohms will be used.

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

End of conversion interrupt.

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

Exact value (const): 1

Required in this object (required): "compatible", "reg"

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>

pmic {
    #address-cells = <1>;
    #size-cells = <0>;

    adc@3600 {
        compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
        reg = <0x3600>;
        interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
        qcom,external-resistor-micro-ohms = <10000>;
        #io-channel-cells = <1>;
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page