diff mbox

gpio: rcar: Add r8a7795 (R-Car H3) support

Message ID 1434710308-15901-1-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Ulrich Hecht June 19, 2015, 10:38 a.m. UTC
R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 +
 drivers/gpio/gpio-rcar.c                                     | 3 +++
 2 files changed, 4 insertions(+)

Comments

khiemnguyen June 19, 2015, 11:39 a.m. UTC | #1
Hi Ulrich,

Thanks for your patch.

On 6/19/2015 5:38 PM, Ulrich Hecht wrote:
> R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>   Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 +
>   drivers/gpio/gpio-rcar.c                                     | 3 +++
>   2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> index 38fb86f..f60e2f4 100644
> --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
> @@ -9,6 +9,7 @@ Required Properties:
>       - "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-r8a7795": for R8A7795 (R-Car H3) 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 fd39774..e962ad5 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -318,6 +318,9 @@ static const struct of_device_id gpio_rcar_of_table[] = {
>   		.compatible = "renesas,gpio-r8a7794",
>   		.data = &gpio_rcar_info_gen2,
>   	}, {
> +		.compatible = "renesas,gpio-r8a7795",
> +		.data = &gpio_rcar_info_gen2,

I suggest that we should create another structure, e.g gpio_rcar_info_gen3,
or change current gpio_rcar_info_gen2 to a more generic name for both 
gen2 and gen3.
What do you think ?

> +	}, {
>   		.compatible = "renesas,gpio-rcar",
>   		.data = &gpio_rcar_info_gen1,
>   	}, {
>
Kuninori Morimoto June 22, 2015, 1:03 a.m. UTC | #2
Hi Ulrich

> R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.
(snip)
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index fd39774..e962ad5 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -318,6 +318,9 @@ static const struct of_device_id gpio_rcar_of_table[] = {
>  		.compatible = "renesas,gpio-r8a7794",
>  		.data = &gpio_rcar_info_gen2,
>  	}, {
> +		.compatible = "renesas,gpio-r8a7795",
> +		.data = &gpio_rcar_info_gen2,
> +	}, {
>  		.compatible = "renesas,gpio-rcar",
>  		.data = &gpio_rcar_info_gen1,
>  	}, {

I would like to have "gen3", or have comment /* gen3 compatible */
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
Simon Horman June 23, 2015, 11:39 p.m. UTC | #3
On Mon, Jun 22, 2015 at 01:03:14AM +0000, Kuninori Morimoto wrote:
> 
> Hi Ulrich
> 
> > R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.
> (snip)
> > diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> > index fd39774..e962ad5 100644
> > --- a/drivers/gpio/gpio-rcar.c
> > +++ b/drivers/gpio/gpio-rcar.c
> > @@ -318,6 +318,9 @@ static const struct of_device_id gpio_rcar_of_table[] = {
> >  		.compatible = "renesas,gpio-r8a7794",
> >  		.data = &gpio_rcar_info_gen2,
> >  	}, {
> > +		.compatible = "renesas,gpio-r8a7795",
> > +		.data = &gpio_rcar_info_gen2,
> > +	}, {
> >  		.compatible = "renesas,gpio-rcar",
> >  		.data = &gpio_rcar_info_gen1,
> >  	}, {
> 
> I would like to have "gen3", or have comment /* gen3 compatible */

I don't feel strongly about this, however, unless I am mistaken the name
in question is internal to this driver. So from my point of view a comment
would suffice.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij July 13, 2015, 10:07 a.m. UTC | #4
On Fri, Jun 19, 2015 at 12:38 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:

> R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

I see there are some comments so waiting for a v2.

I'd like Lauren't ACK on this too.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart July 13, 2015, 6:52 p.m. UTC | #5
On Monday 13 July 2015 12:07:02 Linus Walleij wrote:
> On Fri, Jun 19, 2015 at 12:38 PM, Ulrich Hecht
> 
> <ulrich.hecht+renesas@gmail.com> wrote:
> > R-Car Gen3's GPIO blocks are identical to Gen2's in every respect.
> > 
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> 
> I see there are some comments so waiting for a v2.
> 
> I'd like Lauren't ACK on this too.

I'm already fine with v1 so I'll likely ack v2.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 38fb86f..f60e2f4 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -9,6 +9,7 @@  Required Properties:
     - "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-r8a7795": for R8A7795 (R-Car H3) 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 fd39774..e962ad5 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -318,6 +318,9 @@  static const struct of_device_id gpio_rcar_of_table[] = {
 		.compatible = "renesas,gpio-r8a7794",
 		.data = &gpio_rcar_info_gen2,
 	}, {
+		.compatible = "renesas,gpio-r8a7795",
+		.data = &gpio_rcar_info_gen2,
+	}, {
 		.compatible = "renesas,gpio-rcar",
 		.data = &gpio_rcar_info_gen1,
 	}, {