MIPS: Move Loongson GPIO driver to drivers/gpio
PATCH v4 2/6 MIPS: Move Loongson GPIO driver to drivers/gpio
Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
--- 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%)
arch/mips/configs/lemote2f_defconfig +1 -0
@@ -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
arch/mips/loongson/common/Makefile +0 -1
@@ -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 #
drivers/gpio/Kconfig +6 -0
@@ -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
drivers/gpio/Makefile +1 -0
@@ -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
drivers/gpio/gpio-loongson.c renamed from arch/mips/loongson/common/gpio.c +0 -0
Signature · 1 line
1.7.7.3
Quoted 1 line · Huacai Chen
Move Loongson-2's GPIO driver to
drivers/gpioand addKconfigoptions.
Guess this should go through the GPIO tree once the platform maintainers have acked this?
Quoted 7 lines · Alexandre Courbot
Quoted 1 line · Huacai Chen
Move Loongson-2's GPIO driver to
drivers/gpioand addKconfigoptions.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?
Quoted 5 lines · Alexandre Courbot
Quoted 5 lines · Huacai Chen
Quoted 1 line
Move Loongson-2's GPIO driver to
drivers/gpioand addKconfigoptions.
Quoted 8 lines
Quoted 2 lines
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 intodrivers/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
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"<[email protected]>; Date: Wed, Nov 19, 2014 06:11 PM To: "Alexandre Courbot"<[email protected]>;
Cc: "Huacai Chen"<[email protected]>; "John Crispin"<[email protected]>; "Steven J. Hill"<[email protected]>; "linux-mips"<[email protected]>; "Fuxin Zhang"<[email protected]>; "wuzhangjin"<[email protected]>; "[email protected]"<[email protected]>;
Subject: Re: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio
Quoted 5 lines · Alexandre Courbot
Quoted 5 lines · Huacai Chen
Quoted 1 line
Move Loongson-2's GPIO driver to
drivers/gpioand addKconfigoptions.
Quoted 8 lines
Quoted 2 lines
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 intodrivers/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
Quoted 3 lines · 陈华才
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html