From: Tomasz Figa <tomasz.figa@gmail.com>
To: linux-samsung-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
Kukjin Kim <kgene.kim@samsung.com>,
linux-gpio@vger.kernel.org,
Ian Campbell <ian.campbell@citrix.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
Rob Herring <rob.herring@calxeda.com>,
Russell King <linux@arm.linux.org.uk>,
Stephen Warren <swarren@wwwdotorg.org>,
Thomas Gleixner <tglx@linutronix.de>,
Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
Marc Zyngier <marc.zyngier@arm.com>,
Mark Brown <broonie@kernel.org>,
Tomasz Figa <tomasz.figa@gmail.com>
Subject: [PATCH v7 3/7] gpio: samsung: Skip initialization if device tree is present
Date: Wed, 21 Aug 2013 23:21:47 +0200 [thread overview]
Message-ID: <1377120111-25601-4-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1377120111-25601-1-git-send-email-tomasz.figa@gmail.com>
Since this driver does not handle GPIO on device tree enabled platforms
any more, it should be bypassed whenever device tree is available, to
not conflict with the new pinctrl-samsung driver.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
drivers/gpio/gpio-samsung.c | 34 +++++++---------------------------
1 file changed, 7 insertions(+), 27 deletions(-)
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index a1392f4..cc93b1b 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2949,34 +2949,14 @@ static __init int samsung_gpiolib_init(void)
int i, nr_chips;
int group = 0;
-#if defined(CONFIG_PINCTRL_EXYNOS) || defined(CONFIG_PINCTRL_EXYNOS5440)
/*
- * This gpio driver includes support for device tree support and there
- * are platforms using it. In order to maintain compatibility with those
- * platforms, and to allow non-dt Exynos4210 platforms to use this
- * gpiolib support, a check is added to find out if there is a active
- * pin-controller driver support available. If it is available, this
- * gpiolib support is ignored and the gpiolib support available in
- * pin-controller driver is used. This is a temporary check and will go
- * away when all of the Exynos4210 platforms have switched to using
- * device tree and the pin-ctrl driver.
- */
- struct device_node *pctrl_np;
- static const struct of_device_id exynos_pinctrl_ids[] = {
- { .compatible = "samsung,s3c2412-pinctrl", },
- { .compatible = "samsung,s3c2416-pinctrl", },
- { .compatible = "samsung,s3c2440-pinctrl", },
- { .compatible = "samsung,s3c2450-pinctrl", },
- { .compatible = "samsung,exynos4210-pinctrl", },
- { .compatible = "samsung,exynos4x12-pinctrl", },
- { .compatible = "samsung,exynos5250-pinctrl", },
- { .compatible = "samsung,exynos5440-pinctrl", },
- { }
- };
- for_each_matching_node(pctrl_np, exynos_pinctrl_ids)
- if (pctrl_np && of_device_is_available(pctrl_np))
- return -ENODEV;
-#endif
+ * Currently there are two drivers that can provide GPIO support for
+ * Samsung SoCs. For device tree enabled platforms, the new
+ * pinctrl-samsung driver is used, providing both GPIO and pin control
+ * interfaces. For legacy (non-DT) platforms this driver is used.
+ */
+ if (of_have_populated_dt())
+ return -ENODEV;
samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
--
1.8.3.2
next prev parent reply other threads:[~2013-08-21 21:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 21:21 [PATCH v7 0/7] Initial Device Tree support for S3C64xx Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 1/7] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-08-21 23:19 ` Linus Walleij
2013-08-22 7:57 ` Tomasz Figa
2013-08-22 23:22 ` [PATCH v8 1/7] irqchip: " Tomasz Figa
2013-08-23 18:12 ` Linus Walleij
2013-08-23 22:11 ` Stephen Warren
2013-08-23 23:04 ` Tomasz Figa
2013-08-23 23:19 ` Stephen Warren
2013-08-23 23:33 ` Tomasz Figa
2013-08-24 15:25 ` Rob Herring
2013-08-24 15:31 ` Tomasz Figa
2013-08-24 16:35 ` Rob Herring
2013-08-24 16:57 ` Tomasz Figa
2013-08-23 23:54 ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 2/7] ARM: s3c64xx: Bypass legacy initialization when booting with DT Tomasz Figa
2013-08-21 21:21 ` Tomasz Figa [this message]
2013-08-21 23:21 ` [PATCH v7 3/7] gpio: samsung: Skip initialization if device tree is present Linus Walleij
2013-08-22 8:06 ` Tomasz Figa
2013-08-22 9:48 ` Mark Brown
2013-08-22 9:59 ` Kukjin Kim
2013-08-22 23:19 ` Tomasz Figa
2013-08-23 18:11 ` Linus Walleij
2013-08-25 17:21 ` Kukjin Kim
2013-08-22 9:45 ` Kukjin Kim
2013-08-21 21:21 ` [PATCH v7 4/7] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 5/7] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-08-22 23:24 ` [PATCH v8 " Tomasz Figa
2013-08-23 23:56 ` [PATCH v9 " Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 6/7] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-08-21 21:21 ` [PATCH v7 7/7] ARM: dts: Add dts file for S3C6410-based SMDK6410 board Tomasz Figa
2013-08-25 17:31 ` [PATCH v7 0/7] Initial Device Tree support for S3C64xx Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377120111-25601-4-git-send-email-tomasz.figa@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ian.campbell@citrix.com \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).