Commit 20051f5f authored by Rob Herring's avatar Rob Herring

dt-bindings: iio: ad7124: Fix dtc warnings in example

With the conversion to DT schema, the examples are now compiled with
dtc. The ad7124 binding example has the following warning:

Documentation/devicetree/bindings/iio/adc/adi,ad7124.example.dts:19.11-21: \
Warning (reg_format): /example-0/adc@0:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)

There's a default #size-cells and #address-cells values of 1 for
examples. For examples needing different values such as this one on a
SPI bus, they need to provide a SPI bus parent node.

Fixes: 26ae15e6 ("Convert AD7124 bindings documentation to YAML format.")

Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent fbbf2b6e
...@@ -114,42 +114,47 @@ patternProperties: ...@@ -114,42 +114,47 @@ patternProperties:
examples: examples:
- | - |
adc@0 { spi {
compatible = "adi,ad7124-4";
reg = <0>;
spi-max-frequency = <5000000>;
interrupts = <25 2>;
interrupt-parent = <&gpio>;
refin1-supply = <&adc_vref>;
clocks = <&ad7124_mclk>;
clock-names = "mclk";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
channel@0 { adc@0 {
compatible = "adi,ad7124-4";
reg = <0>; reg = <0>;
diff-channels = <0 1>; spi-max-frequency = <5000000>;
adi,reference-select = <0>; interrupts = <25 2>;
adi,buffered-positive; interrupt-parent = <&gpio>;
}; refin1-supply = <&adc_vref>;
clocks = <&ad7124_mclk>;
channel@1 { clock-names = "mclk";
reg = <1>;
bipolar; #address-cells = <1>;
diff-channels = <2 3>; #size-cells = <0>;
adi,reference-select = <0>;
adi,buffered-positive; channel@0 {
adi,buffered-negative; reg = <0>;
}; diff-channels = <0 1>;
adi,reference-select = <0>;
channel@2 { adi,buffered-positive;
reg = <2>; };
diff-channels = <4 5>;
}; channel@1 {
reg = <1>;
channel@3 { bipolar;
reg = <3>; diff-channels = <2 3>;
diff-channels = <6 7>; adi,reference-select = <0>;
adi,buffered-positive;
adi,buffered-negative;
};
channel@2 {
reg = <2>;
diff-channels = <4 5>;
};
channel@3 {
reg = <3>;
diff-channels = <6 7>;
};
}; };
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment