Spreadtrum SC27XX series PMICs ADC
Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/sprd,sc2720-adc.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Baolin Wang <baolin.wang7@gmail.com>"
Supports the ADC found on these PMICs.
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "sprd,sc2720-adc", "sprd,sc2721-adc", "sprd,sc2723-adc", "sprd,sc2730-adc", "sprd,sc2731-adc", "sprd,ump9620-adc"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
#io-channel-cells — required here #
Exact value (const): 1
hwlocks — required here #
Maximum number of items (maxItems): 1
nvmem-cells — required here #
true — No constraints added by this property rule.
nvmem-cell-names — required here #
true — No constraints added by this property rule.
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
nvmem-cells— not listed as required hereMaximum number of items (
maxItems):2
nvmem-cell-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"big_scale_calib"Item 2
Exact value (
const):"small_scale_calib"When the condition does not match (
else) #Properties and child nodes (
properties)
nvmem-cells— not listed as required hereMaximum number of items (
maxItems):6
nvmem-cell-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"big_scale_calib1"Item 2
Exact value (
const):"big_scale_calib2"Item 3
Exact value (
const):"small_scale_calib1"Item 4
Exact value (
const):"small_scale_calib2"Item 5
Exact value (
const):"vbat_det_cal1"Item 6
Exact value (
const):"vbat_det_cal2"
Required in this object (required): "compatible", "reg", "interrupts", "#io-channel-cells", "hwlocks", "nvmem-cells", "nvmem-cell-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>
pmic {
#address-cells = <1>;
#size-cells = <0>;
adc@504 {
compatible = "sprd,ump9620-adc";
reg = <0x504>;
interrupt-parent = <&ump9620_pmic>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
#io-channel-cells = <1>;
hwlocks = <&hwlock 4>;
nvmem-cells = <&adc_bcal1>, <&adc_bcal2>,
<&adc_scal1>, <&adc_scal2>,
<&vbat_det_cal1>, <&vbat_det_cal2>;
nvmem-cell-names = "big_scale_calib1", "big_scale_calib2",
"small_scale_calib1", "small_scale_calib2",
"vbat_det_cal1", "vbat_det_cal2";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)