blob: d02d26ba62aca8ddeac5e51dfef5d3c30f2eef5f [file] [log] [blame]
From 8fd78e2aaaff6f497d7ff028d334b021a9f97cab Mon Sep 17 00:00:00 2001
From: Ian Molton <ian.molton@codethink.co.uk>
Date: Mon, 2 Sep 2013 16:44:55 +0100
Subject: emev2: GPIOLIB: Enable support for OF
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>
(cherry picked from commit b59278548e2383976f7db5fd3389f9116a6f240d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/gpio/Kconfig | 2 +-
drivers/gpio/gpio-em.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 573c449c49b9..cf35d107fb37 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -126,7 +126,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.
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index c6e1f086efe8..160d759170a5 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -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;
--
1.8.5.rc3