diff mbox series

[v10,04/12] dt-bindings: iio: adc: ad7768-1: Document GPIO controller

Message ID cabbcbef9b1c8b4fcee5df82bbcb499eef9c5dcb.1749063024.git.Jonathan.Santos@analog.com
State Superseded
Headers show
Series iio: adc: ad7768-1: Add features, improvements, and fixes | expand

Commit Message

Jonathan Santos June 4, 2025, 7:36 p.m. UTC
The AD7768-1 ADC exports four bidirectional GPIOs accessible
via register map.

Document GPIO properties necessary to enable GPIO controller for this
device.

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
---
v10 Changes:
* none.

v9 Changes:
* none.

v8 Changes:
* none.

v7 Changes:
* none.

v6 Changes:
* none.

v5 Changes:
* none.

v4 Changes:
* none.

v3 Changes:
* none.

v2 Changes:
* New
---
 .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml      | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Jonathan Cameron June 7, 2025, 12:28 p.m. UTC | #1
On Wed, 4 Jun 2025 16:36:03 -0300
Jonathan Santos <Jonathan.Santos@analog.com> wrote:

> The AD7768-1 ADC exports four bidirectional GPIOs accessible
> via register map.
> 
> Document GPIO properties necessary to enable GPIO controller for this
> device.
> 
> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Small thing for future reference. Good to have DT patches early in a series but
please order those in the same order as you then make use of them later in the
series.  In this case the continued discussion on patch 9 means I can't pick
up patches 2/3 as they won't have a user yet.  That blocks me picking up
this and the GPIO controller support for now as well despite I think those
being ready to go.

Jonathan

> ---
> v10 Changes:
> * none.
> 
> v9 Changes:
> * none.
> 
> v8 Changes:
> * none.
> 
> v7 Changes:
> * none.
> 
> v6 Changes:
> * none.
> 
> v5 Changes:
> * none.
> 
> v4 Changes:
> * none.
> 
> v3 Changes:
> * none.
> 
> v2 Changes:
> * New
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7768-1.yaml      | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> index 9a6df931edc3..18f93586fcdf 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> @@ -85,6 +85,14 @@ properties:
>        dt-bindings/iio/adc/adi,ad7768-1.h.
>      const: 1
>  
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +    description: |
> +      The first cell is for the GPIO number: 0 to 3.
> +      The second cell takes standard GPIO flags.
> +
>  required:
>    - compatible
>    - reg
> @@ -142,6 +150,8 @@ examples:
>              spi-max-frequency = <2000000>;
>              spi-cpol;
>              spi-cpha;
> +            gpio-controller;
> +            #gpio-cells = <2>;
>              vref-supply = <&adc_vref>;
>              interrupts = <25 IRQ_TYPE_EDGE_RISING>;
>              interrupt-parent = <&gpio>;
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
index 9a6df931edc3..18f93586fcdf 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
@@ -85,6 +85,14 @@  properties:
       dt-bindings/iio/adc/adi,ad7768-1.h.
     const: 1
 
+  gpio-controller: true
+
+  "#gpio-cells":
+    const: 2
+    description: |
+      The first cell is for the GPIO number: 0 to 3.
+      The second cell takes standard GPIO flags.
+
 required:
   - compatible
   - reg
@@ -142,6 +150,8 @@  examples:
             spi-max-frequency = <2000000>;
             spi-cpol;
             spi-cpha;
+            gpio-controller;
+            #gpio-cells = <2>;
             vref-supply = <&adc_vref>;
             interrupts = <25 IRQ_TYPE_EDGE_RISING>;
             interrupt-parent = <&gpio>;