Skip to content

Commit 20051f5

Browse files
committed
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: 26ae15e ("Convert AD7124 bindings documentation to YAML format.") Cc: Jonathan Cameron <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent fbbf2b6 commit 20051f5

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -114,42 +114,47 @@ patternProperties:
114114

115115
examples:
116116
- |
117-
adc@0 {
118-
compatible = "adi,ad7124-4";
119-
reg = <0>;
120-
spi-max-frequency = <5000000>;
121-
interrupts = <25 2>;
122-
interrupt-parent = <&gpio>;
123-
refin1-supply = <&adc_vref>;
124-
clocks = <&ad7124_mclk>;
125-
clock-names = "mclk";
126-
117+
spi {
127118
#address-cells = <1>;
128119
#size-cells = <0>;
129120
130-
channel@0 {
121+
adc@0 {
122+
compatible = "adi,ad7124-4";
131123
reg = <0>;
132-
diff-channels = <0 1>;
133-
adi,reference-select = <0>;
134-
adi,buffered-positive;
135-
};
136-
137-
channel@1 {
138-
reg = <1>;
139-
bipolar;
140-
diff-channels = <2 3>;
141-
adi,reference-select = <0>;
142-
adi,buffered-positive;
143-
adi,buffered-negative;
144-
};
145-
146-
channel@2 {
147-
reg = <2>;
148-
diff-channels = <4 5>;
149-
};
150-
151-
channel@3 {
152-
reg = <3>;
153-
diff-channels = <6 7>;
124+
spi-max-frequency = <5000000>;
125+
interrupts = <25 2>;
126+
interrupt-parent = <&gpio>;
127+
refin1-supply = <&adc_vref>;
128+
clocks = <&ad7124_mclk>;
129+
clock-names = "mclk";
130+
131+
#address-cells = <1>;
132+
#size-cells = <0>;
133+
134+
channel@0 {
135+
reg = <0>;
136+
diff-channels = <0 1>;
137+
adi,reference-select = <0>;
138+
adi,buffered-positive;
139+
};
140+
141+
channel@1 {
142+
reg = <1>;
143+
bipolar;
144+
diff-channels = <2 3>;
145+
adi,reference-select = <0>;
146+
adi,buffered-positive;
147+
adi,buffered-negative;
148+
};
149+
150+
channel@2 {
151+
reg = <2>;
152+
diff-channels = <4 5>;
153+
};
154+
155+
channel@3 {
156+
reg = <3>;
157+
diff-channels = <6 7>;
158+
};
154159
};
155160
};

0 commit comments

Comments
 (0)