@@ -37,6 +37,12 @@ properties:
description: IRQ line for the ADC
maxItems: 1
+ rdy-gpios:
+ description: |
+ GPIO reading the ̅R̅D̅Y line. Useful to reliably detect the interrupt
+ condition.
+ maxItems: 1
+
'#address-cells':
const: 1
@@ -111,6 +117,7 @@ unevaluatedProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
@@ -121,6 +128,7 @@ examples:
spi-max-frequency = <5000000>;
interrupts = <25 2>;
interrupt-parent = <&gpio>;
+ rdy-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
refin1-supply = <&adc_vref>;
clocks = <&ad7124_mclk>;
clock-names = "mclk";
For the AD7124 chip the logical irq line (̅R̅D̅Y) is physically on the same pin as the spi MISO output (DOUT) and so reading a register might trigger an interrupt. For correct operation it's critical that the actual state of the pin can be read to judge if an interrupt event is a real one or just a spurious one triggered by toggling the line in its MISO mode. Allow specification of an "rdy-gpios" property that references a GPIO that can be used for that purpose. While this is typically the same GPIO also used (implicitly) as interrupt source, it is still supposed that the interrupt is specified as before and usual. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)