Re: [PATCH v4 03/10] dt-bindings: iio: adc: adi,ad7{124,173,192,780}: Allow specifications of a gpio for irq line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 27, 2024 at 03:59:32PM +0100, Uwe Kleine-König wrote:
> For the AD7124 chip and some of its cousins 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@xxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7124.yaml   | 13 +++++++++++++
>  .../devicetree/bindings/iio/adc/adi,ad7173.yaml   | 12 ++++++++++++
>  .../devicetree/bindings/iio/adc/adi,ad7192.yaml   | 15 +++++++++++++++
>  .../devicetree/bindings/iio/adc/adi,ad7780.yaml   | 11 +++++++++++
>  4 files changed, 51 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> index 35ed04350e28..9f34a055fdf1 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> @@ -37,6 +37,17 @@ properties:
>      description: IRQ line for the ADC
>      maxItems: 1
>  
> +  rdy-gpios:
> +    description: |
> +      GPIO reading the ̅̅R̅D̅Y line. Having such a GPIO is technically optional but
> +      highly recommended because DOUT/̅R̅D̅Y toggles during SPI transfers (in its
> +      DOUT aka MISO role) and so usually triggers a spurious interrupt. The
> +      distinction between such a spurious event and a real one can only be done
> +      by reading such a GPIO. (There is a register telling the same
> +      information, but accessing that one needs a SPI transfer which then
> +      triggers another interrupt event.)
> +    maxItems: 1

Rob commented to v2 which I missed to pickup:

	Don't need '|'.

	Otherwise,

	Reviewed-by: Rob Hering (Arm) <robh@xxxxxxxxxx>

Dropped the | now in my tree in case we need a v5. Otherwise I'd ask
Jonathan to drop the |s when applying. I probably would have dropped the
R-b tag given the changes here (i.e. adding the property to several more
bindings).

Best regards and sorry,
Uwe

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux