linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
@ 2014-11-13 15:12 Huacai Chen
  2014-11-19  8:11 ` Alexandre Courbot
  0 siblings, 1 reply; 6+ messages in thread
From: Huacai Chen @ 2014-11-13 15:12 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: John Crispin, Steven J. Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, linux-gpio, Huacai Chen

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 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 0bb9cc9..15fef59 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 0959ca9..bc5ffac 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -452,6 +452,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 e5d346c..2153a71 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -39,6 +39,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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
  2014-11-13 15:12 [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio Huacai Chen
@ 2014-11-19  8:11 ` Alexandre Courbot
  2014-11-19  8:21   ` Alexandre Courbot
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Courbot @ 2014-11-19  8:11 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Ralf Baechle, John Crispin, Steven J. Hill, linux-mips,
	Fuxin Zhang, Zhangjin Wu, linux-gpio@vger.kernel.org

On Fri, Nov 14, 2014 at 12:12 AM, Huacai Chen <chenhc@lemote.com> wrote:
> Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.

Acked-by: Alexandre Courbot <acourbot@nvidia.com>

Guess this should go through the GPIO tree once the platform
maintainers have acked this?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
  2014-11-19  8:11 ` Alexandre Courbot
@ 2014-11-19  8:21   ` Alexandre Courbot
  2014-11-19 10:11     ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Courbot @ 2014-11-19  8:21 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Ralf Baechle, John Crispin, Steven J. Hill, linux-mips,
	Fuxin Zhang, Zhangjin Wu, linux-gpio@vger.kernel.org

On Wed, Nov 19, 2014 at 5:11 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Fri, Nov 14, 2014 at 12:12 AM, Huacai Chen <chenhc@lemote.com> wrote:
>> Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
>
> Acked-by: Alexandre Courbot <acourbot@nvidia.com>
>
> Guess this should go through the GPIO tree once the platform
> maintainers have acked this?

Ouch. After looking at this driver's implementation I think I have to
take my Ack back. This driver comes with custom definitions of
gpio_get_value() and other functions, which we will want to get rid of
before moving this into drivers/gpio. Can you port this to a proper
gpiolib driver before doing the move?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
  2014-11-19  8:21   ` Alexandre Courbot
@ 2014-11-19 10:11     ` Ralf Baechle
  2014-11-19 14:25       ` 陈华才
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2014-11-19 10:11 UTC (permalink / raw)
  To: Alexandre Courbot
  Cc: Huacai Chen, John Crispin, Steven J. Hill, linux-mips,
	Fuxin Zhang, Zhangjin Wu, linux-gpio@vger.kernel.org

On Wed, Nov 19, 2014 at 05:21:56PM +0900, Alexandre Courbot wrote:

> > On Fri, Nov 14, 2014 at 12:12 AM, Huacai Chen <chenhc@lemote.com> wrote:
> >> Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
> >
> > Acked-by: Alexandre Courbot <acourbot@nvidia.com>
> >
> > Guess this should go through the GPIO tree once the platform
> > maintainers have acked this?
> 
> Ouch. After looking at this driver's implementation I think I have to
> take my Ack back. This driver comes with custom definitions of
> gpio_get_value() and other functions, which we will want to get rid of
> before moving this into drivers/gpio. Can you port this to a proper
> gpiolib driver before doing the move?

As the arch maintainer I'm happy to say farewell to driver code in arch/mips.

Also, can we split the whole procedure into two patches, one for the cleanup
and one for the move?  I don't care in which order.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
  2014-11-19 10:11     ` Ralf Baechle
@ 2014-11-19 14:25       ` 陈华才
  2014-11-21 15:28         ` Alexandre Courbot
  0 siblings, 1 reply; 6+ messages in thread
From: 陈华才 @ 2014-11-19 14:25 UTC (permalink / raw)
  To: Ralf Baechle, Alexandre Courbot
  Cc: John Crispin, Steven J. Hill, linux-mips, Fuxin Zhang, wuzhangjin,
	linux-gpio@vger.kernel.org

Hi, Ralf and Alexandre,

So, I need three patches: clean up, move to drivers/gpio, and improve it to support Loonson-3A/3B?

Huacai
 
 
------------------ Original ------------------
From:  "Ralf Baechle"<ralf@linux-mips.org>;
Date:  Wed, Nov 19, 2014 06:11 PM
To:  "Alexandre Courbot"<gnurou@gmail.com>;
Cc:  "Huacai Chen"<chenhc@lemote.com>; "John Crispin"<john@phrozen.org>; "Steven J. Hill"<Steven.Hill@imgtec.com>; "linux-mips"<linux-mips@linux-mips.org>; "Fuxin Zhang"<zhangfx@lemote.com>; "wuzhangjin"<wuzhangjin@gmail.com>; "linux-gpio@vger.kernel.org"<linux-gpio@vger.kernel.org>;
Subject:  Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
 
On Wed, Nov 19, 2014 at 05:21:56PM +0900, Alexandre Courbot wrote:

> > On Fri, Nov 14, 2014 at 12:12 AM, Huacai Chen <chenhc@lemote.com> wrote:
> >> Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
> >
> > Acked-by: Alexandre Courbot <acourbot@nvidia.com>
> >
> > Guess this should go through the GPIO tree once the platform
> > maintainers have acked this?
> 
> Ouch. After looking at this driver's implementation I think I have to
> take my Ack back. This driver comes with custom definitions of
> gpio_get_value() and other functions, which we will want to get rid of
> before moving this into drivers/gpio. Can you port this to a proper
> gpiolib driver before doing the move?

As the arch maintainer I'm happy to say farewell to driver code in arch/mips.

Also, can we split the whole procedure into two patches, one for the cleanup
and one for the move?  I don't care in which order.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
  2014-11-19 14:25       ` 陈华才
@ 2014-11-21 15:28         ` Alexandre Courbot
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Courbot @ 2014-11-21 15:28 UTC (permalink / raw)
  To: 陈华才
  Cc: Ralf Baechle, John Crispin, Steven J. Hill, linux-mips,
	Fuxin Zhang, wuzhangjin, linux-gpio@vger.kernel.org

On Wed, Nov 19, 2014 at 11:25 PM, 陈华才 <chenhc@lemote.com> wrote:
> Hi, Ralf and Alexandre,
>
> So, I need three patches: clean up, move to drivers/gpio, and improve it to support Loonson-3A/3B?

Exactly. Before accepting a new driver in drivers/gpio we would like
to make sure it is up-to-date with respect to the current GPIO drivers
practices.

Thanks,
Alex.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-21 15:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 15:12 [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio Huacai Chen
2014-11-19  8:11 ` Alexandre Courbot
2014-11-19  8:21   ` Alexandre Courbot
2014-11-19 10:11     ` Ralf Baechle
2014-11-19 14:25       ` 陈华才
2014-11-21 15:28         ` Alexandre Courbot

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).