lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241128125811.11913-3-alisa.roman@analog.com>
Date: Thu, 28 Nov 2024 14:55:02 +0200
From: Alisa-Dariana Roman <alisadariana@...il.com>
To: Alisa-Dariana Roman <alisa.roman@...log.com>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Michael Hennerich <michael.hennerich@...log.com>,
	linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>
Subject: [PATCH v1 2/3] dt-bindings: iio: adc: ad7192: Add sync gpio

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@...log.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.
+    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>;
             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>;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ