From: Huacai Chen <chenhc@lemote.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <john@phrozen.org>,
"Steven J. Hill" <Steven.Hill@imgtec.com>,
linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
Zhangjin Wu <wuzhangjin@gmail.com>,
linux-gpio@vger.kernel.org, Huacai Chen <chenhc@lemote.com>
Subject: [PATCH V7 4/8] MIPS: Move Loongson GPIO driver to drivers/gpio
Date: Fri, 23 Jan 2015 16:56:08 +0800 [thread overview]
Message-ID: <1422003369-3019-2-git-send-email-chenhc@lemote.com> (raw)
In-Reply-To: <1422003369-3019-1-git-send-email-chenhc@lemote.com>
Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
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 e51aad9..0cbc986 100644
--- a/arch/mips/configs/lemote2f_defconfig
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -171,6 +171,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
--
1.7.7.3
next prev parent reply other threads:[~2015-01-23 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 8:56 [PATCH V7 3/8] MIPS: Cleanup Loongson-2F's gpio driver Huacai Chen
2015-01-23 8:56 ` Huacai Chen [this message]
2015-02-26 9:29 ` [PATCH V7 4/8] MIPS: Move Loongson GPIO driver to drivers/gpio Alexandre Courbot
2015-01-23 8:56 ` [PATCH V7 5/8] GPIO: Add Loongson-3A/3B GPIO driver support Huacai Chen
2015-02-26 9:28 ` [PATCH V7 3/8] MIPS: Cleanup Loongson-2F's gpio driver Alexandre Courbot
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=1422003369-3019-2-git-send-email-chenhc@lemote.com \
--to=chenhc@lemote.com \
--cc=Steven.Hill@imgtec.com \
--cc=john@phrozen.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=wuzhangjin@gmail.com \
--cc=zhangfx@lemote.com \
/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).