1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-01 10:58:12 +03:00

Deprecate the old SPI-GPIO driver.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14464 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mb 2009-02-10 16:55:38 +00:00
parent 85a0242c71
commit 6799839412
6 changed files with 65 additions and 55 deletions

View File

@ -690,20 +690,20 @@ endef
$(eval $(call KernelPackage,spi-bitbang)) $(eval $(call KernelPackage,spi-bitbang))
define KernelPackage/spi-gpio define KernelPackage/spi-gpio-old
SUBMENU:=$(OTHER_MENU) SUBMENU:=$(OTHER_MENU)
TITLE:=GPIO based bitbanging SPI controller TITLE:=Old GPIO based bitbanging SPI controller (DEPRECATED)
DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang
KCONFIG:=CONFIG_SPI_GPIO KCONFIG:=CONFIG_SPI_GPIO_OLD
FILES:=$(LINUX_DIR)/drivers/spi/spi_gpio.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/drivers/spi/spi_gpio_old.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,92,spi_gpio) AUTOLOAD:=$(call AutoLoad,92,spi_gpio_old)
endef endef
define KernelPackage/spi-gpio/description define KernelPackage/spi-gpio-old/description
This package contains the GPIO based bitbanging SPI controller driver This package contains the GPIO based bitbanging SPI controller driver
endef endef
$(eval $(call KernelPackage,spi-gpio)) $(eval $(call KernelPackage,spi-gpio-old))
define KernelPackage/spi-dev define KernelPackage/spi-dev
SUBMENU:=$(OTHER_MENU) SUBMENU:=$(OTHER_MENU)

View File

@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/mmc-over-gpio define KernelPackage/mmc-over-gpio
SUBMENU:=Other modules SUBMENU:=Other modules
DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio DEPENDS:=@GPIO_SUPPORT +kmod-mmc-spi +kmod-spi-gpio-old
KCONFIG:=CONFIG_GPIOMMC CONFIG_CONFIGFS_FS=y KCONFIG:=CONFIG_GPIOMMC CONFIG_CONFIGFS_FS=y
TITLE:=MMC/SD card over GPIO support TITLE:=MMC/SD card over GPIO support
FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/drivers/mmc/host/gpiommc.$(LINUX_KMOD_SUFFIX)

View File

@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/wrt55agv2-spidevs define KernelPackage/wrt55agv2-spidevs
SUBMENU:=Other modules SUBMENU:=Other modules
TITLE:=WRT55AG v2 SPI devices support TITLE:=WRT55AG v2 SPI devices support
DEPENDS:=@LINUX_2_6 @TARGET_atheros +kmod-spi-gpio +kmod-spi-ks8995 DEPENDS:=@LINUX_2_6 @TARGET_atheros +kmod-spi-gpio-old +kmod-spi-ks8995
FILES:=$(PKG_BUILD_DIR)/wrt55agv2_spidevs.$(LINUX_KMOD_SUFFIX) FILES:=$(PKG_BUILD_DIR)/wrt55agv2_spidevs.$(LINUX_KMOD_SUFFIX)
endef endef

View File

@ -12,7 +12,7 @@
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spi/spi_gpio.h> #include <linux/spi/spi_gpio_old.h>
#define DRV_NAME "wrt55agv2-spidevs" #define DRV_NAME "wrt55agv2-spidevs"
#define DRV_DESC "SPI driver for the WRT55AG v2 board" #define DRV_DESC "SPI driver for the WRT55AG v2 board"

View File

@ -1,5 +1,15 @@
--- /dev/null THIS CODE IS DEPRECATED.
+++ b/include/linux/spi/spi_gpio.h
Please use the new mainline SPI-GPIO driver, as of 2.6.29.
--mb
Index: linux-2.6.28.2/include/linux/spi/spi_gpio_old.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.28.2/include/linux/spi/spi_gpio_old.h 2009-02-10 17:14:33.000000000 +0100
@@ -0,0 +1,73 @@ @@ -0,0 +1,73 @@
+/* +/*
+ * spi_gpio interface to platform code + * spi_gpio interface to platform code
@ -74,8 +84,10 @@
+int spi_gpio_next_id(void); +int spi_gpio_next_id(void);
+ +
+#endif /* _LINUX_SPI_SPI_GPIO */ +#endif /* _LINUX_SPI_SPI_GPIO */
--- /dev/null Index: linux-2.6.28.2/drivers/spi/spi_gpio_old.c
+++ b/drivers/spi/spi_gpio.c ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.28.2/drivers/spi/spi_gpio_old.c 2009-02-10 17:15:01.000000000 +0100
@@ -0,0 +1,251 @@ @@ -0,0 +1,251 @@
+/* +/*
+ * Bitbanging SPI bus driver using GPIO API + * Bitbanging SPI bus driver using GPIO API
@ -103,7 +115,7 @@
+#include <linux/platform_device.h> +#include <linux/platform_device.h>
+#include <linux/spi/spi.h> +#include <linux/spi/spi.h>
+#include <linux/spi/spi_bitbang.h> +#include <linux/spi/spi_bitbang.h>
+#include <linux/spi/spi_gpio.h> +#include <linux/spi/spi_gpio_old.h>
+#include <linux/gpio.h> +#include <linux/gpio.h>
+#include <asm/atomic.h> +#include <asm/atomic.h>
+ +
@ -328,49 +340,35 @@
+MODULE_AUTHOR("Michael Buesch"); +MODULE_AUTHOR("Michael Buesch");
+MODULE_DESCRIPTION("Platform independent GPIO bitbanging SPI driver"); +MODULE_DESCRIPTION("Platform independent GPIO bitbanging SPI driver");
+MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL v2");
--- a/drivers/spi/Kconfig Index: linux-2.6.28.2/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig ===================================================================
@@ -100,6 +100,19 @@ config SPI_BUTTERFLY --- linux-2.6.28.2.orig/drivers/spi/Kconfig 2009-02-10 17:13:57.000000000 +0100
+++ linux-2.6.28.2/drivers/spi/Kconfig 2009-02-10 17:14:33.000000000 +0100
@@ -100,6 +100,15 @@ config SPI_BUTTERFLY
inexpensive battery powered microcontroller evaluation board. inexpensive battery powered microcontroller evaluation board.
This same cable can be used to flash new firmware. This same cable can be used to flash new firmware.
+config SPI_GPIO +config SPI_GPIO_OLD
+ tristate "GPIO API based bitbanging SPI controller" + tristate "Old GPIO API based bitbanging SPI controller (DEPRECATED)"
+ depends on SPI_MASTER && GENERIC_GPIO + depends on SPI_MASTER && GENERIC_GPIO
+ select SPI_BITBANG + select SPI_BITBANG
+ help + help
+ This is a platform driver that can be used for bitbanging + This code is deprecated. Please use the new mainline SPI-GPIO driver.
+ an SPI bus over GPIO pins.
+ Select this if you have any SPI device that is connected via
+ GPIO pins.
+ The module will be called spi_gpio.
+ +
+ If unsure, say N. + If unsure, say N.
+ +
config SPI_IMX config SPI_IMX
tristate "Freescale iMX SPI controller" tristate "Freescale iMX SPI controller"
depends on ARCH_IMX && EXPERIMENTAL depends on ARCH_IMX && EXPERIMENTAL
--- a/drivers/spi/Makefile Index: linux-2.6.28.2/drivers/spi/Makefile
+++ b/drivers/spi/Makefile ===================================================================
--- linux-2.6.28.2.orig/drivers/spi/Makefile 2009-02-10 17:13:57.000000000 +0100
+++ linux-2.6.28.2/drivers/spi/Makefile 2009-02-10 17:14:33.000000000 +0100
@@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx. @@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.
obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o obj-$(CONFIG_SPI_BITBANG) += spi_bitbang.o
obj-$(CONFIG_SPI_AU1550) += au1550_spi.o obj-$(CONFIG_SPI_AU1550) += au1550_spi.o
obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o obj-$(CONFIG_SPI_BUTTERFLY) += spi_butterfly.o
+obj-$(CONFIG_SPI_GPIO) += spi_gpio.o +obj-$(CONFIG_SPI_GPIO_OLD) += spi_gpio_old.o
obj-$(CONFIG_SPI_IMX) += spi_imx.o obj-$(CONFIG_SPI_IMX) += spi_imx.o
obj-$(CONFIG_SPI_LM70_LLP) += spi_lm70llp.o obj-$(CONFIG_SPI_LM70_LLP) += spi_lm70llp.o
obj-$(CONFIG_SPI_PXA2XX) += pxa2xx_spi.o obj-$(CONFIG_SPI_PXA2XX) += pxa2xx_spi.o
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4027,6 +4027,11 @@ M: jbglaw@lug-owl.de
L: linux-kernel@vger.kernel.org
S: Maintained
+SPI GPIO MASTER DRIVER
+P: Michael Buesch
+M: mb@bu3sch.de
+S: Maintained
+
STABLE BRANCH
P: Greg Kroah-Hartman
M: greg@kroah.com

View File

@ -1,5 +1,7 @@
--- /dev/null Index: linux-2.6.28.2/drivers/mmc/host/gpiommc.c
+++ b/drivers/mmc/host/gpiommc.c ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.28.2/drivers/mmc/host/gpiommc.c 2009-02-10 17:16:16.000000000 +0100
@@ -0,0 +1,608 @@ @@ -0,0 +1,608 @@
+/* +/*
+ * Driver an MMC/SD card on a bitbanging GPIO SPI bus. + * Driver an MMC/SD card on a bitbanging GPIO SPI bus.
@ -15,7 +17,7 @@
+#include <linux/platform_device.h> +#include <linux/platform_device.h>
+#include <linux/list.h> +#include <linux/list.h>
+#include <linux/mutex.h> +#include <linux/mutex.h>
+#include <linux/spi/spi_gpio.h> +#include <linux/spi/spi_gpio_old.h>
+#include <linux/configfs.h> +#include <linux/configfs.h>
+#include <linux/gpio.h> +#include <linux/gpio.h>
+#include <asm/atomic.h> +#include <asm/atomic.h>
@ -609,8 +611,10 @@
+ platform_driver_unregister(&gpiommc_plat_driver); + platform_driver_unregister(&gpiommc_plat_driver);
+} +}
+module_exit(gpiommc_modexit); +module_exit(gpiommc_modexit);
--- a/drivers/mmc/host/Kconfig Index: linux-2.6.28.2/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig ===================================================================
--- linux-2.6.28.2.orig/drivers/mmc/host/Kconfig 2009-02-10 17:16:15.000000000 +0100
+++ linux-2.6.28.2/drivers/mmc/host/Kconfig 2009-02-10 17:16:16.000000000 +0100
@@ -192,3 +192,28 @@ config MMC_TMIO @@ -192,3 +192,28 @@ config MMC_TMIO
help help
This provides support for the SD/MMC cell found in TC6393XB, This provides support for the SD/MMC cell found in TC6393XB,
@ -640,16 +644,20 @@
+ help + help
+ This option automatically enables configfs support for gpiommc + This option automatically enables configfs support for gpiommc
+ if configfs is available. + if configfs is available.
--- a/drivers/mmc/host/Makefile Index: linux-2.6.28.2/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile ===================================================================
--- linux-2.6.28.2.orig/drivers/mmc/host/Makefile 2009-02-10 17:16:15.000000000 +0100
+++ linux-2.6.28.2/drivers/mmc/host/Makefile 2009-02-10 17:16:16.000000000 +0100
@@ -22,4 +22,5 @@ obj-$(CONFIG_MMC_SPI) += mmc_spi.o @@ -22,4 +22,5 @@ obj-$(CONFIG_MMC_SPI) += mmc_spi.o
obj-$(CONFIG_MMC_S3C) += s3cmci.o obj-$(CONFIG_MMC_S3C) += s3cmci.o
obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o
obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o
+obj-$(CONFIG_GPIOMMC) += gpiommc.o +obj-$(CONFIG_GPIOMMC) += gpiommc.o
--- /dev/null Index: linux-2.6.28.2/include/linux/mmc/gpiommc.h
+++ b/include/linux/mmc/gpiommc.h ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.28.2/include/linux/mmc/gpiommc.h 2009-02-10 17:16:16.000000000 +0100
@@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
+/* +/*
+ * Device driver for MMC/SD cards driven over a GPIO bus. + * Device driver for MMC/SD cards driven over a GPIO bus.
@ -722,8 +730,10 @@
+int gpiommc_next_id(void); +int gpiommc_next_id(void);
+ +
+#endif /* LINUX_GPIOMMC_H_ */ +#endif /* LINUX_GPIOMMC_H_ */
--- /dev/null Index: linux-2.6.28.2/Documentation/gpiommc.txt
+++ b/Documentation/gpiommc.txt ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.28.2/Documentation/gpiommc.txt 2009-02-10 17:16:16.000000000 +0100
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
+GPIOMMC - Driver for an MMC/SD card on a bitbanging GPIO SPI bus +GPIOMMC - Driver for an MMC/SD card on a bitbanging GPIO SPI bus
+================================================================ +================================================================
@ -822,8 +832,10 @@
+(/config/gpiommc/my_mmc in this example). +(/config/gpiommc/my_mmc in this example).
+There's no need to first unregister the device before removing it. That will +There's no need to first unregister the device before removing it. That will
+be done automatically. +be done automatically.
--- a/MAINTAINERS Index: linux-2.6.28.2/MAINTAINERS
+++ b/MAINTAINERS ===================================================================
--- linux-2.6.28.2.orig/MAINTAINERS 2009-02-10 17:16:15.000000000 +0100
+++ linux-2.6.28.2/MAINTAINERS 2009-02-10 17:16:16.000000000 +0100
@@ -1911,6 +1911,11 @@ W: http://moinejf.free.fr @@ -1911,6 +1911,11 @@ W: http://moinejf.free.fr
L: video4linux-list@redhat.com L: video4linux-list@redhat.com
S: Maintained S: Maintained