Skip to content

Commit 834874e

Browse files
dlechmachschmitt
authored andcommitted
dt-bindings: iio: adc: adi,ad7380: add spi-rx-bus-width property
Add spi-rx-bus-width property to describe how many SDO lines are wired up on the ADC. These chips are simultaneous sampling ADCs and have one SDO line per channel, either 2 or 4 total depending on the part number. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent e278727 commit 834874e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ properties:
6363
spi-cpol: true
6464
spi-cpha: true
6565

66+
spi-rx-bus-width:
67+
maxItems: 4
68+
items:
69+
maximum: 1
70+
6671
vcc-supply:
6772
description: A 3V to 3.6V supply that powers the chip.
6873

@@ -161,6 +166,23 @@ patternProperties:
161166
unevaluatedProperties: false
162167

163168
allOf:
169+
# 2-channel chips only have two SDO lines
170+
- if:
171+
properties:
172+
compatible:
173+
enum:
174+
- adi,ad7380
175+
- adi,ad7381
176+
- adi,ad7383
177+
- adi,ad7384
178+
- adi,ad7386
179+
- adi,ad7387
180+
- adi,ad7388
181+
then:
182+
properties:
183+
spi-rx-bus-width:
184+
maxItems: 2
185+
164186
# pseudo-differential chips require common mode voltage supplies,
165187
# true differential chips don't use them
166188
- if:
@@ -285,6 +307,7 @@ examples:
285307
spi-cpol;
286308
spi-cpha;
287309
spi-max-frequency = <80000000>;
310+
spi-rx-bus-width = <1>, <1>, <1>, <1>;
288311
289312
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
290313
interrupt-parent = <&gpio0>;

0 commit comments

Comments
 (0)