[package] remove the i2c-gpio-custom driver from adm5120, and make it available on...
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 29 Apr 2008 17:18:21 +0000 (17:18 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 29 Apr 2008 17:18:21 +0000 (17:18 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10979 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/i2c-gpio-custom/Makefile [new file with mode: 0644]
package/i2c-gpio-custom/src/Kconfig [new file with mode: 0644]
package/i2c-gpio-custom/src/Makefile [new file with mode: 0644]
package/i2c-gpio-custom/src/i2c-gpio-custom.c [moved from target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c with 100% similarity]
package/kernel/modules/i2c.mk
target/linux/adm5120/patches/300-i2c_gpio_custom.patch [deleted file]

diff --git a/package/i2c-gpio-custom/Makefile b/package/i2c-gpio-custom/Makefile
new file mode 100644 (file)
index 0000000..fd448ce
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=i2c-gpio-custom
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/i2c-gpio-custom
+  SUBMENU:=I2C support
+  TITLE:=Custom GPIO-based I2C device
+  DEPENDS:=@GPIO_SUPPORT kmod-i2c-core +kmod-i2c-gpio
+  FILES:=$(PKG_BUILD_DIR)/i2c-gpio-custom.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,58,i2c-gpio-custom)
+  KCONFIG:=
+endef
+
+define KernelPackage/i2c-gpio-custom/description
+ Kernel module for register a custom i2c-gpio platform device.
+endef
+
+EXTRA_KCONFIG:= \
+       CONFIG_I2C_GPIO_CUSTOM=m
+
+EXTRA_CFLAGS:= \
+       $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
+       $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
+
+MAKE_OPTS:= \
+       ARCH="$(LINUX_KARCH)" \
+       CROSS_COMPILE="$(TARGET_CROSS)" \
+       SUBDIRS="$(PKG_BUILD_DIR)" \
+       EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+       LINUXINCLUDE="-I$(LINUX_DIR)/include -include linux/autoconf.h" \
+       $(EXTRA_KCONFIG)
+
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+       $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
+define Build/Compile
+       $(MAKE) -C "$(LINUX_DIR)" \
+               $(MAKE_OPTS) \
+               modules
+endef
+
+$(eval $(call KernelPackage,i2c-gpio-custom))
diff --git a/package/i2c-gpio-custom/src/Kconfig b/package/i2c-gpio-custom/src/Kconfig
new file mode 100644 (file)
index 0000000..e2e3a68
--- /dev/null
@@ -0,0 +1,10 @@
+config I2C_GPIO_CUSTOM
+       tristate "Custom GPIO-based I2C driver"
+       depends on GENERIC_GPIO
+       select I2C_GPIO
+       help
+         This is an I2C driver to register 1 to 4 custom I2C buses using
+         GPIO lines.
+
+         This support is also available as a module.  If so, the module
+         will be called i2c-gpio-custom.
diff --git a/package/i2c-gpio-custom/src/Makefile b/package/i2c-gpio-custom/src/Makefile
new file mode 100644 (file)
index 0000000..dcb2e2a
--- /dev/null
@@ -0,0 +1 @@
+obj-${CONFIG_I2C_GPIO_CUSTOM}  += i2c-gpio-custom.o
\ No newline at end of file
index c02672f4398c552fedae2c01149c5d4bcfeebeea..687fa9fb2992da2e7e79ecdfcf4eb4903120ce56 100644 (file)
@@ -93,22 +93,6 @@ endef
 $(eval $(call KernelPackage,i2c-gpio))
 
 
-define KernelPackage/i2c-gpio-custom
-  SUBMENU:=$(I2C_MENU)
-  TITLE:=Custom GPIO-based I2C device
-  DEPENDS:=@TARGET_adm5120 kmod-i2c-core +kmod-i2c-gpio
-  KCONFIG:=CONFIG_I2C_GPIO_CUSTOM
-  FILES:=$(LINUX_DIR)/drivers/i2c/busses/i2c-gpio-custom.$(LINUX_KMOD_SUFFIX)
-  AUTOLOAD:=$(call AutoLoad,58,i2c-gpio-custom)
-endef
-
-define KernelPackage/i2c-gpio-custom/description
- Kernel module for register a custom i2c-gpio platform device.
-endef
-
-$(eval $(call KernelPackage,i2c-gpio-custom))
-
-
 define KernelPackage/i2c-scx200
   SUBMENU:=$(I2C_MENU)
   TITLE:=Geode SCx200 I2C using GPIO pins
@@ -135,7 +119,7 @@ define KernelPackage/i2c-scx200-acb
 endef
 
 define KernelPackage/i2c-scx200-acb/description
- Kernel module for I2C using the ACCESS.bus controllers on the Geode SCx200 
+ Kernel module for I2C using the ACCESS.bus controllers on the Geode SCx200
  and SC1100 processors and the CS5535 and CS5536 Geode companion devices.
 endef
 
diff --git a/target/linux/adm5120/patches/300-i2c_gpio_custom.patch b/target/linux/adm5120/patches/300-i2c_gpio_custom.patch
deleted file mode 100644 (file)
index f7f8997..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Index: linux-2.6.24.2/drivers/i2c/busses/Kconfig
-===================================================================
---- linux-2.6.24.2.orig/drivers/i2c/busses/Kconfig
-+++ linux-2.6.24.2/drivers/i2c/busses/Kconfig
-@@ -146,6 +146,17 @@ config I2C_GPIO
-         This is a very simple bitbanging I2C driver utilizing the
-         arch-neutral GPIO API to control the SCL and SDA lines.
-+config I2C_GPIO_CUSTOM
-+      tristate "Custom GPIO-based I2C driver"
-+      depends on GENERIC_GPIO
-+      select I2C_GPIO
-+      help
-+        This is an I2C driver to register 1 to 4 custom I2C buses using 
-+        GPIO lines.
-+
-+        This support is also available as a module.  If so, the module
-+        will be called i2c-gpio-custom.
-+
- config I2C_HYDRA
-       tristate "CHRP Apple Hydra Mac I/O I2C interface"
-       depends on PCI && PPC_CHRP && EXPERIMENTAL
-Index: linux-2.6.24.2/drivers/i2c/busses/Makefile
-===================================================================
---- linux-2.6.24.2.orig/drivers/i2c/busses/Makefile
-+++ linux-2.6.24.2/drivers/i2c/busses/Makefile
-@@ -14,6 +14,7 @@ obj-$(CONFIG_I2C_BLACKFIN_TWI)       += i2c-bf
- obj-$(CONFIG_I2C_DAVINCI)     += i2c-davinci.o
- obj-$(CONFIG_I2C_ELEKTOR)     += i2c-elektor.o
- obj-$(CONFIG_I2C_GPIO)                += i2c-gpio.o
-+obj-$(CONFIG_I2C_GPIO_CUSTOM) += i2c-gpio-custom.o
- obj-$(CONFIG_I2C_HYDRA)               += i2c-hydra.o
- obj-$(CONFIG_I2C_I801)                += i2c-i801.o
- obj-$(CONFIG_I2C_I810)                += i2c-i810.o