diff mbox series

[v2,1/4] dt-bindings: iio: adc: adi,ad7124: Use symbolic name for interrupt flag

Message ID 20241028160748.489596-7-u.kleine-koenig@baylibre.com
State Needs Review / ACK
Headers show
Series iio: adc: ad7124: Make it work on de10-nano | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Uwe Kleine-König Oct. 28, 2024, 4:07 p.m. UTC
Using IRQ_TYPE_EDGE_FALLING instead of 2 makes the example easier to
understand for a human (and adds only little more effort for a parser).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Oct. 29, 2024, 7:36 a.m. UTC | #1
On Mon, Oct 28, 2024 at 05:07:50PM +0100, Uwe Kleine-König wrote:
> Using IRQ_TYPE_EDGE_FALLING instead of 2 makes the example easier to
> understand for a human (and adds only little more effort for a parser).
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> index 35ed04350e28..de49b571bd57 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
> @@ -111,6 +111,7 @@ unevaluatedProperties: false
>  
>  examples:
>    - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
>      spi {
>        #address-cells = <1>;
>        #size-cells = <0>;
> @@ -119,7 +120,7 @@ examples:
>          compatible = "adi,ad7124-4";
>          reg = <0>;
>          spi-max-frequency = <5000000>;
> -        interrupts = <25 2>;
> +        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;

Sorry, but this is trivial. Do it for all the bindings in IIO or IIO/ADC
in one patch. Or just leave it because old code was correct.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
index 35ed04350e28..de49b571bd57 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
@@ -111,6 +111,7 @@  unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/irq.h>
     spi {
       #address-cells = <1>;
       #size-cells = <0>;
@@ -119,7 +120,7 @@  examples:
         compatible = "adi,ad7124-4";
         reg = <0>;
         spi-max-frequency = <5000000>;
-        interrupts = <25 2>;
+        interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
         interrupt-parent = <&gpio>;
         refin1-supply = <&adc_vref>;
         clocks = <&ad7124_mclk>;