aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisashi Nakamura <hisashi.nakamura.ak@renesas.com>2014-11-07 06:54:08 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-11-27 09:01:19 -0500
commit1fd2b49d0bd986fb22dd0a36910f24823e7bb0a0 (patch)
treed9ed1f4853f856d7e4323653fc9bd25ee6bd4a03
parente5db3b338aae35fbdd8b33cef6e2510f42ea4640 (diff)
gpio: rcar: Add r8a7793 and r8a7794 support
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>
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt4
-rw-r--r--drivers/gpio/gpio-rcar.c27
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 941a26aa4322..38fb86f28ba2 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:
6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. 6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. 7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. 8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2) compatible GPIO controller. 9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
10 - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
11 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
10 - "renesas,gpio-rcar": for generic R-Car GPIO controller. 12 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
11 13
12 - reg: Base address and length of each memory resource used by the GPIO 14 - 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 bf6c09450fee..584484e3f1e3 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * Renesas R-Car GPIO Support 2 * Renesas R-Car GPIO Support
3 * 3 *
4 * Copyright (C) 2014 Renesas Electronics Corporation
4 * Copyright (C) 2013 Magnus Damm 5 * Copyright (C) 2013 Magnus Damm
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -291,22 +292,30 @@ struct gpio_rcar_info {
291 bool has_both_edge_trigger; 292 bool has_both_edge_trigger;
292}; 293};
293 294
295static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
296 .has_both_edge_trigger = false,
297};
298
299static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
300 .has_both_edge_trigger = true,
301};
302
294static const struct of_device_id gpio_rcar_of_table[] = { 303static const struct of_device_id gpio_rcar_of_table[] = {
295 { 304 {
296 .compatible = "renesas,gpio-r8a7790", 305 .compatible = "renesas,gpio-r8a7790",
297 .data = (void *)&(const struct gpio_rcar_info) { 306 .data = &gpio_rcar_info_gen2,
298 .has_both_edge_trigger = true,
299 },
300 }, { 307 }, {
301 .compatible = "renesas,gpio-r8a7791", 308 .compatible = "renesas,gpio-r8a7791",
302 .data = (void *)&(const struct gpio_rcar_info) { 309 .data = &gpio_rcar_info_gen2,
303 .has_both_edge_trigger = true, 310 }, {
304 }, 311 .compatible = "renesas,gpio-r8a7793",
312 .data = &gpio_rcar_info_gen2,
313 }, {
314 .compatible = "renesas,gpio-r8a7794",
315 .data = &gpio_rcar_info_gen2,
305 }, { 316 }, {
306 .compatible = "renesas,gpio-rcar", 317 .compatible = "renesas,gpio-rcar",
307 .data = (void *)&(const struct gpio_rcar_info) { 318 .data = &gpio_rcar_info_gen1,
308 .has_both_edge_trigger = false,
309 },
310 }, { 319 }, {
311 /* Terminator */ 320 /* Terminator */
312 }, 321 },