Skip to content

Commit 116bf42

Browse files
committed
dt-bindings: iio: adc: ad7768-1: add synchronization over SPI property
Add adi,sync-in-spi property to enable synchronization over SPI. This should be used in the case when the GPIO cannot provide a pulse synchronous with the base MCLK signal. User can choose between SPI, GPIO synchronization or neither of them, but only if a external pulse can be provided, for example, by another device in a multidevice setup. Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
1 parent 3c8d009 commit 116bf42

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ properties:
6666
in any way, for example if the filter decimation rate changes.
6767
As the line is active low, it should be marked GPIO_ACTIVE_LOW.
6868

69+
adi,sync-in-spi:
70+
description:
71+
Enables synchronization of multiple devices over SPI. This property is
72+
used when a signal synchronous to the base MCLK signal cannot be provided
73+
via GPIO. It requires the SYNC_OUT pin to be connected to the SYNC_IN pin
74+
on the ADC. In the case of multiple devices, the SYNC_OUT pin of one device
75+
should be routed to the SYNC_IN pins of the other devices.
76+
6977
reset-gpios:
7078
maxItems: 1
7179

@@ -98,7 +106,21 @@ required:
98106
- vref-supply
99107
- spi-cpol
100108
- spi-cpha
101-
- adi,sync-in-gpios
109+
110+
allOf:
111+
# adi,sync-in-gpios and adi,sync-in-spi are mutually exclusive (neither is also valid)
112+
- if:
113+
required:
114+
- adi,sync-in-gpios
115+
then:
116+
properties:
117+
adi,sync-in-spi: false
118+
- if:
119+
required:
120+
- adi,sync-in-spi
121+
then:
122+
properties:
123+
adi,sync-in-gpios: false
102124

103125
patternProperties:
104126
"^channel@([0-9]|1[0-5])$":

0 commit comments

Comments
 (0)