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

From: Geert Uytterhoeven
Date: Fri Apr 24 2020 - 04:07:14 EST


Hi Eugeniu,

CC devicetree

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

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 -- geert@xxxxxxxxxxxxxx

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