From patchwork Sun Dec 28 04:57:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 424294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 470611400D2 for ; Sun, 28 Dec 2014 16:03:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbaL1FDB (ORCPT ); Sun, 28 Dec 2014 00:03:01 -0500 Received: from ec2-54-194-6-37.eu-west-1.compute.amazonaws.com ([54.194.6.37]:59955 "EHLO smtpbgie1.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbaL1FDA (ORCPT ); Sun, 28 Dec 2014 00:03:00 -0500 X-Greylist: delayed 303 seconds by postgrey-1.27 at vger.kernel.org; Sun, 28 Dec 2014 00:02:59 EST X-QQ-mid: bizesmtp7t1419742665t526t323 Received: from localhost.localdomain (unknown [222.92.8.142]) by esmtp4.qq.com (ESMTP) with id ; Sun, 28 Dec 2014 12:57:44 +0800 (CST) X-QQ-SSF: 01100000002000F0FH42B00A0000000 X-QQ-FEAT: /peYvah/M2WU4TozAl0shbjmXEX1HJ51l44sk/1PDTTW0oTglN/E2YZV78LFJ T55KxE/wZUIZHzy8SLAFwHKlRgR2AW4jO62NxhZp8nQxit3LeYoAt1u2MgFF3lq5IxgLjZF DImiwoWCoM4lhdK7b/58fOUPhi8ZxRgSKiwyrptCDwAAEEIA75XdiXxRG7GjAcdgkruPLTG 9DwiaRpHVTuSqLAIX9+M42gNSU/bUa6ExzDjQJcaOhg== X-QQ-GoodBg: 0 From: Huacai Chen To: Ralf Baechle Cc: John Crispin , "Steven J. Hill" , linux-mips@linux-mips.org, Fuxin Zhang , Zhangjin Wu , linux-gpio@vger.kernel.org, Huacai Chen Subject: [PATCH V6 4/8] MIPS: Move Loongson GPIO driver to drivers/gpio Date: Sun, 28 Dec 2014 12:57:33 +0800 Message-Id: <1419742654-15094-2-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1419742654-15094-1-git-send-email-chenhc@lemote.com> References: <1419742654-15094-1-git-send-email-chenhc@lemote.com> X-QQ-SENDSIZE: 520 X-QQ-Bgrelay: 1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options. Signed-off-by: Huacai Chen --- arch/mips/configs/lemote2f_defconfig | 1 + arch/mips/loongson/common/Makefile | 1 - drivers/gpio/Kconfig | 6 ++++++ drivers/gpio/Makefile | 1 + .../common/gpio.c => drivers/gpio/gpio-loongson.c | 0 5 files changed, 8 insertions(+), 1 deletions(-) rename arch/mips/loongson/common/gpio.c => drivers/gpio/gpio-loongson.c (100%) diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig index 227a9de..0549b01 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig @@ -172,6 +172,7 @@ CONFIG_SERIAL_8250_FOURPORT=y CONFIG_LEGACY_PTY_COUNT=16 CONFIG_HW_RANDOM=y CONFIG_RTC=y +CONFIG_GPIO_LOONGSON=y CONFIG_THERMAL=y CONFIG_MEDIA_SUPPORT=m CONFIG_VIDEO_DEV=m diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile index d87e033..e70c33f 100644 --- a/arch/mips/loongson/common/Makefile +++ b/arch/mips/loongson/common/Makefile @@ -4,7 +4,6 @@ obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \ bonito-irq.o mem.o machtype.o platform.o -obj-$(CONFIG_GPIOLIB) += gpio.o obj-$(CONFIG_PCI) += pci.o # diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 633ec21..3ac5473 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -475,6 +475,12 @@ config GPIO_GRGPIO Select this to support Aeroflex Gaisler GRGPIO cores from the GRLIB VHDL IP core library. +config GPIO_LOONGSON + tristate "Loongson-2 GPIO support" + depends on CPU_LOONGSON2 + help + driver for GPIO functionality on Loongson-2F processors. + config GPIO_TB10X bool select GENERIC_IRQ_CHIP diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 81755f1..caccfad 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -41,6 +41,7 @@ obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o obj-$(CONFIG_GPIO_INTEL_MID) += gpio-intel-mid.o +obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o obj-$(CONFIG_ARCH_LPC32XX) += gpio-lpc32xx.o obj-$(CONFIG_GPIO_LYNXPOINT) += gpio-lynxpoint.o diff --git a/arch/mips/loongson/common/gpio.c b/drivers/gpio/gpio-loongson.c similarity index 100% rename from arch/mips/loongson/common/gpio.c rename to drivers/gpio/gpio-loongson.c