* [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
@ 2014-11-07 11:54 Yoshihiro Kaneko
2014-11-14 10:04 ` Linus Walleij
2014-12-12 19:17 ` Laurent Pinchart
0 siblings, 2 replies; 7+ messages in thread
From: Yoshihiro Kaneko @ 2014-11-07 11:54 UTC (permalink / raw)
To: linux-gpio
Cc: Linus Walleij, Alexandre Courbot, Simon Horman, Magnus Damm,
linux-sh
From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
is added.
Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---
This patch is based on for-next branch of Linus Walleij's gpio tree.
v2 [Yoshihiro Kaneko]
* As suggested by Geert Uytterhoeven
- clean up 4 identical copies of struct gpio_rcar_info.
.../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 4 +++-
drivers/gpio/gpio-rcar.c | 27 ++++++++++++++--------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 941a26a..38fb86f 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -6,7 +6,9 @@ Required Properties:
- "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
- "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
- "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
- - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller.
+ - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
+ - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
+ - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
- "renesas,gpio-rcar": for generic R-Car GPIO controller.
- reg: Base address and length of each memory resource used by the GPIO
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index ef71ca8..24f0343 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -1,6 +1,7 @@
/*
* Renesas R-Car GPIO Support
*
+ * Copyright (C) 2014 Renesas Electronics Corporation
* Copyright (C) 2013 Magnus Damm
*
* This program is free software; you can redistribute it and/or modify
@@ -315,22 +316,30 @@ struct gpio_rcar_info {
bool has_both_edge_trigger;
};
+static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
+ .has_both_edge_trigger = false,
+};
+
+static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
+ .has_both_edge_trigger = true,
+};
+
static const struct of_device_id gpio_rcar_of_table[] = {
{
.compatible = "renesas,gpio-r8a7790",
- .data = (void *)&(const struct gpio_rcar_info) {
- .has_both_edge_trigger = true,
- },
+ .data = &gpio_rcar_info_gen2,
}, {
.compatible = "renesas,gpio-r8a7791",
- .data = (void *)&(const struct gpio_rcar_info) {
- .has_both_edge_trigger = true,
- },
+ .data = &gpio_rcar_info_gen2,
+ }, {
+ .compatible = "renesas,gpio-r8a7793",
+ .data = &gpio_rcar_info_gen2,
+ }, {
+ .compatible = "renesas,gpio-r8a7794",
+ .data = &gpio_rcar_info_gen2,
}, {
.compatible = "renesas,gpio-rcar",
- .data = (void *)&(const struct gpio_rcar_info) {
- .has_both_edge_trigger = false,
- },
+ .data = &gpio_rcar_info_gen1,
}, {
/* Terminator */
},
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-11-07 11:54 [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support Yoshihiro Kaneko
@ 2014-11-14 10:04 ` Linus Walleij
2014-12-12 19:17 ` Laurent Pinchart
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2014-11-14 10:04 UTC (permalink / raw)
To: Yoshihiro Kaneko
Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Simon Horman,
Magnus Damm, linux-sh@vger.kernel.org
On Fri, Nov 7, 2014 at 12:54 PM, Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote:
> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>
> The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
> is added.
>
> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---
>
> This patch is based on for-next branch of Linus Walleij's gpio tree.
>
> v2 [Yoshihiro Kaneko]
> * As suggested by Geert Uytterhoeven
> - clean up 4 identical copies of struct gpio_rcar_info.
Patch applied.
As mentions in another thread I want someone to work on using
GPIOLIB_IRQCHIP for the Rcar driver.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-11-07 11:54 [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support Yoshihiro Kaneko
2014-11-14 10:04 ` Linus Walleij
@ 2014-12-12 19:17 ` Laurent Pinchart
2014-12-15 2:03 ` Magnus Damm
1 sibling, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2014-12-12 19:17 UTC (permalink / raw)
To: Yoshihiro Kaneko
Cc: linux-gpio, Linus Walleij, Alexandre Courbot, Simon Horman,
Magnus Damm, linux-sh
On Friday 07 November 2014 20:54:08 Yoshihiro Kaneko wrote:
> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>
> The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
> is added.
>
> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---
>
> This patch is based on for-next branch of Linus Walleij's gpio tree.
>
> v2 [Yoshihiro Kaneko]
> * As suggested by Geert Uytterhoeven
> - clean up 4 identical copies of struct gpio_rcar_info.
>
> .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 4 +++-
> drivers/gpio/gpio-rcar.c | 27 ++++++++++++-------
> 2 files changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index
> 941a26a..38fb86f 100644
> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> @@ -6,7 +6,9 @@ Required Properties:
> - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO
> controller.
> - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO
> controller.
> - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO
> controller.
> - - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO
> controller.
> + - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO
> controller.
> + - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO
> controller.
> + - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO
> controller.
> - "renesas,gpio-rcar": for generic R-Car GPIO controller.
>
> - reg: Base address and length of each memory resource used by the GPIO
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index ef71ca8..24f0343 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -1,6 +1,7 @@
> /*
> * Renesas R-Car GPIO Support
> *
> + * Copyright (C) 2014 Renesas Electronics Corporation
> * Copyright (C) 2013 Magnus Damm
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -315,22 +316,30 @@ struct gpio_rcar_info {
> bool has_both_edge_trigger;
> };
>
> +static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
> + .has_both_edge_trigger = false,
> +};
> +
> +static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
> + .has_both_edge_trigger = true,
> +};
Seriously, doesn't this call for a "renesas,gpio-rcar-gen2" compatible string
?
> static const struct of_device_id gpio_rcar_of_table[] = {
> {
> .compatible = "renesas,gpio-r8a7790",
> - .data = (void *)&(const struct gpio_rcar_info) {
> - .has_both_edge_trigger = true,
> - },
> + .data = &gpio_rcar_info_gen2,
> }, {
> .compatible = "renesas,gpio-r8a7791",
> - .data = (void *)&(const struct gpio_rcar_info) {
> - .has_both_edge_trigger = true,
> - },
> + .data = &gpio_rcar_info_gen2,
> + }, {
> + .compatible = "renesas,gpio-r8a7793",
> + .data = &gpio_rcar_info_gen2,
> + }, {
> + .compatible = "renesas,gpio-r8a7794",
> + .data = &gpio_rcar_info_gen2,
> }, {
> .compatible = "renesas,gpio-rcar",
> - .data = (void *)&(const struct gpio_rcar_info) {
> - .has_both_edge_trigger = false,
> - },
> + .data = &gpio_rcar_info_gen1,
> }, {
> /* Terminator */
> },
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-12-12 19:17 ` Laurent Pinchart
@ 2014-12-15 2:03 ` Magnus Damm
2014-12-15 8:41 ` Geert Uytterhoeven
2014-12-15 8:49 ` Laurent Pinchart
0 siblings, 2 replies; 7+ messages in thread
From: Magnus Damm @ 2014-12-15 2:03 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Yoshihiro Kaneko, linux-gpio, Linus Walleij, Alexandre Courbot,
Simon Horman, SH-Linux
Hi Geert,
On Sat, Dec 13, 2014 at 4:17 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Friday 07 November 2014 20:54:08 Yoshihiro Kaneko wrote:
>> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>>
>> The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
>> is added.
>>
>> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
>> ---
>>
>> This patch is based on for-next branch of Linus Walleij's gpio tree.
>>
>> v2 [Yoshihiro Kaneko]
>> * As suggested by Geert Uytterhoeven
>> - clean up 4 identical copies of struct gpio_rcar_info.
>>
>> .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 4 +++-
>> drivers/gpio/gpio-rcar.c | 27 ++++++++++++-------
>> 2 files changed, 21 insertions(+), 10 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index
>> 941a26a..38fb86f 100644
>> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> @@ -6,7 +6,9 @@ Required Properties:
>> - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO
>> controller.
>> - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO
>> controller.
>> - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO
>> controller.
>> - - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO
>> controller.
>> + - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO
>> controller.
>> + - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO
>> controller.
>> + - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO
>> controller.
>> - "renesas,gpio-rcar": for generic R-Car GPIO controller.
>>
>> - reg: Base address and length of each memory resource used by the GPIO
>> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
>> index ef71ca8..24f0343 100644
>> --- a/drivers/gpio/gpio-rcar.c
>> +++ b/drivers/gpio/gpio-rcar.c
>> @@ -1,6 +1,7 @@
>> /*
>> * Renesas R-Car GPIO Support
>> *
>> + * Copyright (C) 2014 Renesas Electronics Corporation
>> * Copyright (C) 2013 Magnus Damm
>> *
>> * This program is free software; you can redistribute it and/or modify
>> @@ -315,22 +316,30 @@ struct gpio_rcar_info {
>> bool has_both_edge_trigger;
>> };
>>
>> +static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
>> + .has_both_edge_trigger = false,
>> +};
>> +
>> +static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
>> + .has_both_edge_trigger = true,
>> +};
>
> Seriously, doesn't this call for a "renesas,gpio-rcar-gen2" compatible string
> ?
Maybe, but only if we had a crystal ball and could predict that the IP
would be guaranteed not to change inside future Gen2 devices! =)
/ magnus
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-12-15 2:03 ` Magnus Damm
@ 2014-12-15 8:41 ` Geert Uytterhoeven
2014-12-15 8:49 ` Laurent Pinchart
1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-12-15 8:41 UTC (permalink / raw)
To: Magnus Damm
Cc: Laurent Pinchart, Yoshihiro Kaneko, linux-gpio, Linus Walleij,
Alexandre Courbot, Simon Horman, SH-Linux
Hi Magnus,
On Mon, Dec 15, 2014 at 3:03 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Hi Geert,
For the record, it's Laurent who's questioning this...
> On Sat, Dec 13, 2014 at 4:17 AM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
[...]
>> Seriously, doesn't this call for a "renesas,gpio-rcar-gen2" compatible string
>> ?
>
> Maybe, but only if we had a crystal ball and could predict that the IP
> would be guaranteed not to change inside future Gen2 devices! =)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-12-15 2:03 ` Magnus Damm
2014-12-15 8:41 ` Geert Uytterhoeven
@ 2014-12-15 8:49 ` Laurent Pinchart
2014-12-15 9:39 ` Magnus Damm
1 sibling, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2014-12-15 8:49 UTC (permalink / raw)
To: Magnus Damm
Cc: Yoshihiro Kaneko, linux-gpio, Linus Walleij, Alexandre Courbot,
Simon Horman, SH-Linux
Hi Magnus,
On Monday 15 December 2014 11:03:49 Magnus Damm wrote:
> On Sat, Dec 13, 2014 at 4:17 AM, Laurent Pinchart wrote:
> > On Friday 07 November 2014 20:54:08 Yoshihiro Kaneko wrote:
> >> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
> >>
> >> The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
> >> is added.
> >>
> >> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
> >> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> >> ---
> >>
> >> This patch is based on for-next branch of Linus Walleij's gpio tree.
> >>
> >> v2 [Yoshihiro Kaneko]
> >> * As suggested by Geert Uytterhoeven
> >>
> >> - clean up 4 identical copies of struct gpio_rcar_info.
> >>
> >> .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 4 +++-
> >> drivers/gpio/gpio-rcar.c | 27 +++++++++-------
> >> 2 files changed, 21 insertions(+), 10 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> >> b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index
> >> 941a26a..38fb86f 100644
> >> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> >> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> >>
> >> @@ -6,7 +6,9 @@ Required Properties:
> >> - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO
> >> controller.
> >> - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO
> >> controller.
> >> - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO
> >> controller.
> >> - - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO
> >> controller.
> >> + - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO
> >> controller.
> >> + - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO
> >> controller.
> >> + - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO
> >> controller.
> >>
> >> - "renesas,gpio-rcar": for generic R-Car GPIO controller.
> >>
> >> - reg: Base address and length of each memory resource used by the
> >> GPIO
> >>
> >> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> >> index ef71ca8..24f0343 100644
> >> --- a/drivers/gpio/gpio-rcar.c
> >> +++ b/drivers/gpio/gpio-rcar.c
> >> @@ -1,6 +1,7 @@
> >> /*
> >> * Renesas R-Car GPIO Support
> >> *
> >> + * Copyright (C) 2014 Renesas Electronics Corporation
> >> * Copyright (C) 2013 Magnus Damm
> >> *
> >> * This program is free software; you can redistribute it and/or modify
> >> @@ -315,22 +316,30 @@ struct gpio_rcar_info {
> >> bool has_both_edge_trigger;
> >> };
> >>
> >> +static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
> >> + .has_both_edge_trigger = false,
> >> +};
> >> +
> >> +static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
> >> + .has_both_edge_trigger = true,
> >> +};
> >
> > Seriously, doesn't this call for a "renesas,gpio-rcar-gen2" compatible
> > string ?
>
> Maybe, but only if we had a crystal ball and could predict that the IP
> would be guaranteed not to change inside future Gen2 devices! =)
Do we expect future Gen2 devices ? And if they happen to be incompatible we
could call them v2.5 ;-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support
2014-12-15 8:49 ` Laurent Pinchart
@ 2014-12-15 9:39 ` Magnus Damm
0 siblings, 0 replies; 7+ messages in thread
From: Magnus Damm @ 2014-12-15 9:39 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Yoshihiro Kaneko, linux-gpio, Linus Walleij, Alexandre Courbot,
Simon Horman, SH-Linux
Hi Laurent (not Geert, sorry!),
On Mon, Dec 15, 2014 at 5:49 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> On Monday 15 December 2014 11:03:49 Magnus Damm wrote:
>> On Sat, Dec 13, 2014 at 4:17 AM, Laurent Pinchart wrote:
>> > On Friday 07 November 2014 20:54:08 Yoshihiro Kaneko wrote:
>> >> From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>> >>
>> >> The device tree probing for R-Car M2-N (r8a7793) and R-Car E2 (r8a7794)
>> >> is added.
>> >>
>> >> Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
>> >> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
>> >> ---
>> >>
>> >> This patch is based on for-next branch of Linus Walleij's gpio tree.
>> >>
>> >> v2 [Yoshihiro Kaneko]
>> >> * As suggested by Geert Uytterhoeven
>> >>
>> >> - clean up 4 identical copies of struct gpio_rcar_info.
>> >>
>> >> .../devicetree/bindings/gpio/renesas,gpio-rcar.txt | 4 +++-
>> >> drivers/gpio/gpio-rcar.c | 27 +++++++++-------
>> >> 2 files changed, 21 insertions(+), 10 deletions(-)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> >> b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index
>> >> 941a26a..38fb86f 100644
>> >> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> >> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
>> >>
>> >> @@ -6,7 +6,9 @@ Required Properties:
>> >> - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO
>> >> controller.
>> >> - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO
>> >> controller.
>> >> - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO
>> >> controller.
>> >> - - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO
>> >> controller.
>> >> + - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO
>> >> controller.
>> >> + - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO
>> >> controller.
>> >> + - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO
>> >> controller.
>> >>
>> >> - "renesas,gpio-rcar": for generic R-Car GPIO controller.
>> >>
>> >> - reg: Base address and length of each memory resource used by the
>> >> GPIO
>> >>
>> >> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
>> >> index ef71ca8..24f0343 100644
>> >> --- a/drivers/gpio/gpio-rcar.c
>> >> +++ b/drivers/gpio/gpio-rcar.c
>> >> @@ -1,6 +1,7 @@
>> >> /*
>> >> * Renesas R-Car GPIO Support
>> >> *
>> >> + * Copyright (C) 2014 Renesas Electronics Corporation
>> >> * Copyright (C) 2013 Magnus Damm
>> >> *
>> >> * This program is free software; you can redistribute it and/or modify
>> >> @@ -315,22 +316,30 @@ struct gpio_rcar_info {
>> >> bool has_both_edge_trigger;
>> >> };
>> >>
>> >> +static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
>> >> + .has_both_edge_trigger = false,
>> >> +};
>> >> +
>> >> +static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
>> >> + .has_both_edge_trigger = true,
>> >> +};
>> >
>> > Seriously, doesn't this call for a "renesas,gpio-rcar-gen2" compatible
>> > string ?
>>
>> Maybe, but only if we had a crystal ball and could predict that the IP
>> would be guaranteed not to change inside future Gen2 devices! =)
>
> Do we expect future Gen2 devices ? And if they happen to be incompatible we
> could call them v2.5 ;-)
Random stuff is being invented all the time. I went to an embedded
fair here in Japan a month or two ago and ran into some customer with
a board that included a Gen2-related SoC with a name I've never seen
before. I see them all the time. This particular one had super-many
camera sensors or something. Anyway, the hardware guys are not asking
for our permission before they "fork and modify". So following
well-known part numbers for DT ABI seems like a safe practice to me.
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-15 9:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-07 11:54 [PATCH v2] gpio: rcar: Add r8a7793 and r8a7794 support Yoshihiro Kaneko
2014-11-14 10:04 ` Linus Walleij
2014-12-12 19:17 ` Laurent Pinchart
2014-12-15 2:03 ` Magnus Damm
2014-12-15 8:41 ` Geert Uytterhoeven
2014-12-15 8:49 ` Laurent Pinchart
2014-12-15 9:39 ` Magnus Damm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).