gpio: rcar: Add r8a7793 and r8a7794 support
authorHisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Fri, 7 Nov 2014 11:54:08 +0000 (20:54 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Nov 2014 14:01:19 +0000 (15:01 +0100)
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>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
drivers/gpio/gpio-rcar.c

index 941a26aa43228647dc021527c894a6ceb0d69d88..38fb86f28ba2ce1c6a364b47c0ba38e38632a39c 100644 (file)
@@ -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
index bf6c09450feed3c0477a29947fe94e260c93ed1a..584484e3f1e3cd1dfe4ef6c99d2f6b9748174019 100644 (file)
@@ -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
@@ -291,22 +292,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 */
        },