]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
emev2: GPIOLIB: Enable support for OF
authorIan Molton <ian.molton@codethink.co.uk>
Mon, 2 Sep 2013 15:44:55 +0000 (16:44 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Sep 2013 13:33:45 +0000 (15:33 +0200)
EMEV2 is now a DT platform, however the GPIO driver cannot be used
from a DT file since it does not fill out the of_node field in its
gpio_chip structure.

Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-em.c

index b6ed304863eb97dc68e4afd0f35e359ca53903fd..a6d67c5d0c202d840462bd932f644e8718c5ce35 100644 (file)
@@ -129,7 +129,7 @@ config GPIO_IT8761E
 
 config GPIO_EM
        tristate "Emma Mobile GPIO"
-       depends on ARM
+       depends on ARM && OF_GPIO
        help
          Say yes here to support GPIO on Renesas Emma Mobile SoCs.
 
index c6e1f086efe8455733c3f27080f301a1922ea6db..160d759170a57fbca8374a237062dce12ecf3a35 100644 (file)
@@ -319,6 +319,7 @@ static int em_gio_probe(struct platform_device *pdev)
        }
 
        gpio_chip = &p->gpio_chip;
+       gpio_chip->of_node = pdev->dev.of_node;
        gpio_chip->direction_input = em_gio_direction_input;
        gpio_chip->get = em_gio_get;
        gpio_chip->direction_output = em_gio_direction_output;