From: David Lechner <dlechner@baylibre.com>
To: Alisa-Dariana Roman <alisadariana@gmail.com>,
Alisa-Dariana Roman <alisa.roman@analog.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Michael Hennerich <michael.hennerich@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Jonathan Cameron <jic23@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v1 2/3] dt-bindings: iio: adc: ad7192: Add sync gpio
Date: Mon, 2 Dec 2024 16:21:31 -0600 [thread overview]
Message-ID: <7eadbe02-4f81-42d6-b1c5-932e6bbedb19@baylibre.com> (raw)
In-Reply-To: <20241128125811.11913-3-alisa.roman@analog.com>
On 11/28/24 6:55 AM, Alisa-Dariana Roman wrote:
> Add support for the SYNC pin GPIO specification in the devicetree
> bindings. This pin allows synchronization of digital filters and analog
> modulators when using multiple devices. Update the examples to
> demonstrate the usage of the new property.
>
> Also update the interrupt type in the examples to use the proper
> IRQ_TYPE_EDGE_FALLING macro instead of the raw value.
>
> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
> ---
> .../bindings/iio/adc/adi,ad7192.yaml | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> index f70caefdace7..1cd0fd13bc42 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> @@ -59,6 +59,17 @@ properties:
> interrupts:
> maxItems: 1
>
> + sync-gpios:
> + description: |
> + Optional GPIO spec for the SYNC pin. The SYNC pin allows synchronization
> + of the digital filters and analog modulators when using multiple AD7192
> + devices. When SYNC is pulled low, it resets the digital filter nodes,
> + filter control logic, calibration control logic, and holds the analog
> + modulator in reset state. Only specify this property if you need to
> + actively control SYNC for multi-device synchronization, otherwise it
> + defaults to HIGH.
The datasheet says that the /SYNC pin can also be used to trigger a conversion.
But I'm not sure we really need all this explanation here. The important parts
are that this is a GPIO that is connected to the /SYNC pin and in the
synchronization use case, the same GPIO might be connected to multiple ADC
chips.
> + maxItems: 1
> +
> aincom-supply:
> description: |
> AINCOM voltage supply. Analog inputs AINx are referenced to this input
> @@ -182,6 +193,8 @@ unevaluatedProperties: false
>
> examples:
> - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> spi {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -194,8 +207,9 @@ examples:
> spi-cpha;
> clocks = <&ad7192_mclk>;
> clock-names = "mclk";
> - interrupts = <25 0x2>;
> + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> interrupt-parent = <&gpio>;
> + sync-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
On the schematic, the SYNC pin is marked as active low, so I would
expect GPIO_ACTIVE_LOW here.
> aincom-supply = <&aincom>;
> dvdd-supply = <&dvdd>;
> avdd-supply = <&avdd>;
> @@ -208,6 +222,7 @@ examples:
> };
> };
> - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> spi {
> #address-cells = <1>;
> #size-cells = <0>;
> @@ -223,7 +238,7 @@ examples:
> spi-cpol;
> spi-cpha;
> #clock-cells = <0>;
> - interrupts = <25 0x2>;
> + interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> interrupt-parent = <&gpio>;
> aincom-supply = <&aincom>;
> dvdd-supply = <&dvdd>;
next prev parent reply other threads:[~2024-12-02 22:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 12:55 [PATCH v1 0/3] iio: adc: ad7192: Add sync feature Alisa-Dariana Roman
2024-11-28 12:55 ` [PATCH v1 1/3] dt-bindings: iio: adc: ad7192: Add maintainer Alisa-Dariana Roman
2024-11-28 17:18 ` Conor Dooley
2024-11-28 12:55 ` [PATCH v1 2/3] dt-bindings: iio: adc: ad7192: Add sync gpio Alisa-Dariana Roman
2024-11-28 17:18 ` Conor Dooley
2024-12-02 22:21 ` David Lechner [this message]
2024-11-28 12:55 ` [PATCH v1 3/3] " Alisa-Dariana Roman
2024-11-30 18:38 ` Jonathan Cameron
2024-12-02 22:21 ` David Lechner
2024-12-08 18:43 ` Jonathan Cameron
2024-12-09 17:07 ` David Lechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7eadbe02-4f81-42d6-b1c5-932e6bbedb19@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alisa.roman@analog.com \
--cc=alisadariana@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox