diff mbox series

[RFC,1/3] dt-bindings: gpio-rcar: Add optional use-alternative-interrupt property

Message ID 20200422101026.9220-2-erosca@de.adit-jv.com (mailing list archive)
State RFC
Delegated to: Geert Uytterhoeven
Headers show
Series gpio: rcar: Add support for GPIO alternative interrupt | expand

Commit Message

Eugeniu Rosca April 22, 2020, 10:10 a.m. UTC
From: Torii Kenichi <torii.ken1@jp.fujitsu.com>

When setting this property, you must set alternate interrupt number in
the 'interrupts' property.

Signed-off-by: Torii Kenichi <torii.ken1@jp.fujitsu.com>
[erosca: tidy up the descriptions/comments]
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
 Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 3 +++
 1 file changed, 3 insertions(+)

Comments

Geert Uytterhoeven April 24, 2020, 8:06 a.m. UTC | #1
Hi Eugeniu,

CC devicetree

On Wed, Apr 22, 2020 at 12:11 PM Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
> From: Torii Kenichi <torii.ken1@jp.fujitsu.com>
>
> When setting this property, you must set alternate interrupt number in
> the 'interrupts' property.
>
> Signed-off-by: Torii Kenichi <torii.ken1@jp.fujitsu.com>
> [erosca: tidy up the descriptions/comments]
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>

Thanks for your/forwarding this patch!

> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> @@ -50,6 +50,9 @@ Optional properties:
>    - clocks: Must contain a reference to the functional clock.  The property is
>      mandatory if the hardware implements a controllable functional clock for
>      the GPIO instance.
> +  - use-alternative-interrupt: Use 'alternative' GPIO interrupt instead

renesas,use-alternative-interrupt?
(unless you can convince Rob this becomes a generic property).

> +    of 'normal' GPIO interrupt. When you specify this property, you must
> +    also change the 'interrupts' DT property.

In light of "DT describes the hardware", I think you should instead list
both interrupts in DT.  I.e. first/single interrupt is the normal one,
second optional interrupt is the alternative one.

On R-Car Gen2, the oldest SoC family with this feature I could find,
they are called "ext_int" resp. "ext_alt_int", so introducing the
optional "clock-names" property would be a good idea, too.

>    - gpio-reserved-ranges: See gpio.txt.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 10dce84b1545..aa5aea90431a 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -50,6 +50,9 @@  Optional properties:
   - clocks: Must contain a reference to the functional clock.  The property is
     mandatory if the hardware implements a controllable functional clock for
     the GPIO instance.
+  - use-alternative-interrupt: Use 'alternative' GPIO interrupt instead
+    of 'normal' GPIO interrupt. When you specify this property, you must
+    also change the 'interrupts' DT property.
 
   - gpio-reserved-ranges: See gpio.txt.