From patchwork Mon Jun 17 16:33:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2735451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7EB8CC0AB1 for ; Mon, 17 Jun 2013 16:46:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49DDB20468 for ; Mon, 17 Jun 2013 16:46:10 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CAE402045F for ; Mon, 17 Jun 2013 16:46:08 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocXO-0004U3-4E; Mon, 17 Jun 2013 16:44:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocS5-0006Rb-E9; Mon, 17 Jun 2013 16:38:45 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UocPA-00061t-LF for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2013 16:35:50 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOJ00MBNQ1N6260@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2013 17:34:46 +0100 (BST) X-AuditID: cbfec7f5-b7f376d000001ec6-38-51bf3aa65def Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id D3.4B.07878.6AA3FB15; Mon, 17 Jun 2013 17:34:46 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MOJ002RHQ1OMHC0@eusync3.samsung.com>; Mon, 17 Jun 2013 17:34:46 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 14/38] ARM: SAMSUNG: Introduce GPIO_SAMSUNG Kconfig entry Date: Mon, 17 Jun 2013 18:33:59 +0200 Message-id: <1371486863-12398-15-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1371486863-12398-1-git-send-email-t.figa@samsung.com> References: <1371486863-12398-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t/xq7rLrPYHGnTPl7T4O+kYu8WBPzsY LXoXXGWzONv0ht1iyp/lTBabHl9jtZhxfh+Txdojd9ktTl3/zGZx+E07q8X6Ga9ZLI7NWMLo wOPx+9ckRo871/aweWxeUu9x5UQTq0ffllWMHp83yQWwRXHZpKTmZJalFunbJXBl/O97wF6w XaFixbSDLA2M16S6GDk5JARMJLbOWc4KYYtJXLi3nq2LkYtDSGApo8Sx7k1MEE4fk8TDWfPY QarYBNQkPjc8YgOxRQRUJT63LWAHKWIW2M8sseLpEmaQhLCAj8SiBWdZQGwWoKLmr0cYQWxe AWeJ3klP2CDWKUgc374NLM4JFF/cdwusV0jASWL3zEusExh5FzAyrGIUTS1NLihOSs810itO zC0uzUvXS87P3cQICcmvOxiXHrM6xCjAwajEw5sotj9QiDWxrLgy9xCjBAezkghv7MR9gUK8 KYmVValF+fFFpTmpxYcYmTg4pRoYGX79ndhjPJVTl7s07KTUm6XtsW+6j53YInUiObOfy4BN Sz3h3DbuzHeVLv+OR6n23X56v3p/ZMizxj5R9Z/VRn0fPvRe3dKx43PuHz7hSzkLyuaHevNz OXzOWFu563Nm8Ywu79jniVvmGqyeafzoJR/bvZ6PNkHvOqOEHrLtKnJdOfvUZA4lJZbijERD Leai4kQAWysOeycCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130617_123544_852054_FB0EEF34 X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -8.0 (--------) Cc: Kukjin Kim , Arnd Bergmann , Tomasz Figa , Grant Likely , Kyungmin Park , Thomas Abraham , Sylwester Nawrocki , Olof Johansson , Linus Walleij , linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds Kconfig entry that selects whether legacy Samsung GPIO driver should be built or not. For platforms that support only DT based boot, the new pinctrl driver is used and so the old one is not needed. Cc: Grant Likely Cc: Linus Walleij Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- arch/arm/Kconfig | 6 ++++++ arch/arm/plat-samsung/include/plat/pm.h | 5 +++++ drivers/gpio/Kconfig | 7 +++++++ drivers/gpio/Makefile | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ae7247d..9c69e6c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -695,6 +695,7 @@ config ARCH_S3C24XX select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -718,6 +719,7 @@ config ARCH_S3C64XX select CLKSRC_MMIO select CPU_V6 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -741,6 +743,7 @@ config ARCH_S5P64X0 select CLKSRC_MMIO select CPU_V6 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -758,6 +761,7 @@ config ARCH_S5PC100 select CLKSRC_MMIO select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -776,6 +780,7 @@ config ARCH_S5PV210 select CLKSRC_MMIO select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -795,6 +800,7 @@ config ARCH_EXYNOS select COMMON_CLK select CPU_V7 select GENERIC_CLOCKEVENTS + select GPIO_SAMSUNG select HAVE_CLK select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index f6fcade..5d47ca3 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h @@ -166,6 +166,7 @@ extern void s3c_pm_check_store(void); */ extern void s3c_pm_configure_extint(void); +#ifdef CONFIG_GPIO_SAMSUNG /** * samsung_pm_restore_gpios() - restore the state of the gpios after sleep. * @@ -181,6 +182,10 @@ extern void samsung_pm_restore_gpios(void); * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios(). */ extern void samsung_pm_save_gpios(void); +#else +static inline void samsung_pm_restore_gpios(void) {} +static inline void samsung_pm_save_gpios(void) {} +#endif extern void s3c_pm_save_core(void); extern void s3c_pm_restore_core(void); diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 573c449..9c993ed 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -209,6 +209,13 @@ config GPIO_RCAR help Say yes here to support GPIO on Renesas R-Car SoCs. +config GPIO_SAMSUNG + bool + depends on PLAT_SAMSUNG + help + Legacy GPIO support. Use only for platforms without support for + pinctrl. + config GPIO_SPEAR_SPICS bool "ST SPEAr13xx SPI Chip Select as GPIO support" depends on PLAT_SPEAR diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 0cb2d65..ef3e983 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -59,7 +59,7 @@ obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o obj-$(CONFIG_GPIO_RDC321X) += gpio-rdc321x.o obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o -obj-$(CONFIG_PLAT_SAMSUNG) += gpio-samsung.o +obj-$(CONFIG_GPIO_SAMSUNG) += gpio-samsung.o obj-$(CONFIG_ARCH_SA1100) += gpio-sa1100.o obj-$(CONFIG_GPIO_SCH) += gpio-sch.o obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o