From patchwork Sun Jun 5 15:59:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 849872 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p55FpV7i001063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 5 Jun 2011 15:51:52 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTFbg-00029u-Os; Sun, 05 Jun 2011 15:51:16 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QTFbg-0008VP-Cr; Sun, 05 Jun 2011 15:51:16 +0000 Received: from mail-pw0-f49.google.com ([209.85.160.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QTFbU-0008Sb-14 for linux-arm-kernel@lists.infradead.org; Sun, 05 Jun 2011 15:51:05 +0000 Received: by pwi8 with SMTP id 8so2482861pwi.36 for ; Sun, 05 Jun 2011 08:51:00 -0700 (PDT) Received: by 10.68.18.170 with SMTP id x10mr1636296pbd.469.1307289060725; Sun, 05 Jun 2011 08:51:00 -0700 (PDT) Received: from localhost.localdomain ([117.80.114.155]) by mx.google.com with ESMTPS id y2sm3012516pbi.67.2011.06.05.08.50.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Jun 2011 08:51:00 -0700 (PDT) From: Shawn Guo To: linux-kernel@vger.kernel.org Subject: [PATCH v4 1/3] gpio/mxs: Move Freescale mxs gpio driver to drivers/gpio Date: Sun, 5 Jun 2011 23:59:03 +0800 Message-Id: <1307289545-6993-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1307289545-6993-1-git-send-email-shawn.guo@linaro.org> References: <1307289545-6993-1-git-send-email-shawn.guo@linaro.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110605_115104_466990_E79EB864 X-CRM114-Status: GOOD ( 13.66 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] Cc: grant.likely@secretlab.ca, patches@linaro.org, kernel@pengutronix.de, arnd@arndb.de, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 05 Jun 2011 15:51:52 +0000 (UTC) From: Grant Likely GPIO drivers are getting moved to drivers/gpio for cleanup and consolidation. This patch moves the mxs driver. Follow up patches will clean it up and make it a fine upstanding example of a gpio driver. Signed-off-by: Grant Likely Tested-by: Shawn Guo --- arch/arm/mach-mxs/Makefile | 2 +- .../mach-mxs/{gpio.h => include/mach/gpio-mxs.h} | 0 arch/arm/mach-mxs/mach-mx28evk.c | 1 - drivers/gpio/Kconfig | 4 ++++ drivers/gpio/Makefile | 1 + .../arm/mach-mxs/gpio.c => drivers/gpio/gpio-mxs.c | 3 +-- 6 files changed, 7 insertions(+), 4 deletions(-) rename arch/arm/mach-mxs/{gpio.h => include/mach/gpio-mxs.h} (100%) rename arch/arm/mach-mxs/gpio.c => drivers/gpio/gpio-mxs.c (99%) diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index 58e8923..6c38262 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile @@ -1,5 +1,5 @@ # Common support -obj-y := clock.o devices.o gpio.o icoll.o iomux.o system.o timer.o +obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o obj-$(CONFIG_MXS_OCOTP) += ocotp.o obj-$(CONFIG_PM) += pm.o diff --git a/arch/arm/mach-mxs/gpio.h b/arch/arm/mach-mxs/include/mach/gpio-mxs.h similarity index 100% rename from arch/arm/mach-mxs/gpio.h rename to arch/arm/mach-mxs/include/mach/gpio-mxs.h diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index eacdc6b..56767a5 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c @@ -26,7 +26,6 @@ #include #include "devices-mx28.h" -#include "gpio.h" #define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13) #define MX28EVK_FEC_PHY_POWER MXS_GPIO_NR(2, 15) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 18c0b31..daaef0f 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -93,6 +93,10 @@ config GPIO_EXYNOS4 help Say yes here to support Samsung Exynos4 series SoCs GPIO library +config GPIO_MXS + def_bool y + depends on ARCH_MXS + config GPIO_PLAT_SAMSUNG bool "Samsung SoCs GPIO library support" default y diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 4ac7cb3..6056249 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_GPIO_BASIC_MMIO_CORE) += basic_mmio_gpio.o obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o obj-$(CONFIG_GPIO_EXYNOS4) += gpio-exynos4.o obj-$(CONFIG_GPIO_I801) += gpio-i801.o +obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o obj-$(CONFIG_GPIO_PLAT_SAMSUNG) += gpio-plat-samsung.o obj-$(CONFIG_GPIO_S5PC100) += gpio-s5pc100.o obj-$(CONFIG_GPIO_S5PV210) += gpio-s5pv210.o diff --git a/arch/arm/mach-mxs/gpio.c b/drivers/gpio/gpio-mxs.c similarity index 99% rename from arch/arm/mach-mxs/gpio.c rename to drivers/gpio/gpio-mxs.c index 2c950fe..bac7b6b 100644 --- a/arch/arm/mach-mxs/gpio.c +++ b/drivers/gpio/gpio-mxs.c @@ -27,10 +27,9 @@ #include #include #include +#include #include -#include "gpio.h" - static struct mxs_gpio_port *mxs_gpio_ports; static int gpio_table_size;