Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hisashi Nakamura and committed by
Linus Walleij
1fd2b49d e5db3b33

+21 -10
+3 -1
Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
··· 6 6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. 7 7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. 8 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 12 - "renesas,gpio-rcar": for generic R-Car GPIO controller. 11 13 12 14 - reg: Base address and length of each memory resource used by the GPIO
+18 -9
drivers/gpio/gpio-rcar.c
··· 1 1 /* 2 2 * Renesas R-Car GPIO Support 3 3 * 4 + * Copyright (C) 2014 Renesas Electronics Corporation 4 5 * Copyright (C) 2013 Magnus Damm 5 6 * 6 7 * This program is free software; you can redistribute it and/or modify ··· 292 291 bool has_both_edge_trigger; 293 292 }; 294 293 294 + static const struct gpio_rcar_info gpio_rcar_info_gen1 = { 295 + .has_both_edge_trigger = false, 296 + }; 297 + 298 + static const struct gpio_rcar_info gpio_rcar_info_gen2 = { 299 + .has_both_edge_trigger = true, 300 + }; 301 + 295 302 static const struct of_device_id gpio_rcar_of_table[] = { 296 303 { 297 304 .compatible = "renesas,gpio-r8a7790", 298 - .data = (void *)&(const struct gpio_rcar_info) { 299 - .has_both_edge_trigger = true, 300 - }, 305 + .data = &gpio_rcar_info_gen2, 301 306 }, { 302 307 .compatible = "renesas,gpio-r8a7791", 303 - .data = (void *)&(const struct gpio_rcar_info) { 304 - .has_both_edge_trigger = true, 305 - }, 308 + .data = &gpio_rcar_info_gen2, 309 + }, { 310 + .compatible = "renesas,gpio-r8a7793", 311 + .data = &gpio_rcar_info_gen2, 312 + }, { 313 + .compatible = "renesas,gpio-r8a7794", 314 + .data = &gpio_rcar_info_gen2, 306 315 }, { 307 316 .compatible = "renesas,gpio-rcar", 308 - .data = (void *)&(const struct gpio_rcar_info) { 309 - .has_both_edge_trigger = false, 310 - }, 317 + .data = &gpio_rcar_info_gen1, 311 318 }, { 312 319 /* Terminator */ 313 320 },