2020-04-22 10:53:53

by Eugeniu Rosca

[permalink] [raw]
Subject: [RFC PATCH 1/3] dt-bindings: gpio-rcar: Add optional use-alternative-interrupt property

From: Torii Kenichi <[email protected]>

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

Signed-off-by: Torii Kenichi <[email protected]>
[erosca: tidy up the descriptions/comments]
Signed-off-by: Eugeniu Rosca <[email protected]>
---
Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 3 +++
1 file changed, 3 insertions(+)

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.

--
2.26.0


2020-04-24 08:09:00

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [RFC PATCH 1/3] dt-bindings: gpio-rcar: Add optional use-alternative-interrupt property

Hi Eugeniu,

CC devicetree

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

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

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds