linux: fix broken kmod-i2c-mux-pca9541 after r44113
[openwrt.git] / package / kernel / linux / modules / i2c.mk
index f1eea31..8fed494 100644 (file)
@@ -24,13 +24,14 @@ I2C_CORE_MODULES:= \
   CONFIG_I2C:drivers/i2c/i2c-core \
   CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
 
-ifeq ($(CONFIG_OF),y)
-  I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1)
+  ifeq ($(CONFIG_OF),y)
+    I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
+  endif
 endif
 
 define KernelPackage/i2c-core
   $(call i2c_defaults,$(I2C_CORE_MODULES),51)
-  AUTOLOAD:=
   TITLE:=I2C support
 endef
 
@@ -168,6 +169,28 @@ endef
 
 $(eval $(call KernelPackage,i2c-tiny-usb))
 
+
+I2C_PIIX4_MODULES:= \
+  CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
+
+define KernelPackage/i2c-piix4
+  $(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
+  TITLE:=Intel PIIX4 and compatible I2C interfaces
+  DEPENDS:=@PCI_SUPPORT @(x86||x86_64) kmod-i2c-core
+endef
+
+define KernelPackage/i2c-piix4/description
+ Support for the Intel PIIX4 family of mainboard I2C interfaces,
+ specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
+ ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
+ AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
+ Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
+ SMSC Victory66.
+endef
+
+$(eval $(call KernelPackage,i2c-piix4))
+
+
 I2C_MUX_MODULES:= \
   CONFIG_I2C_MUX:drivers/i2c/i2c-mux
 
@@ -183,13 +206,8 @@ endef
 
 $(eval $(call KernelPackage,i2c-mux))
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
 I2C_MUX_GPIO_MODULES:= \
   CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
-else
-I2C_MUX_GPIO_MODULES:= \
-  CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/gpio-i2cmux
-endif
 
 define KernelPackage/i2c-mux-gpio
   $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
@@ -203,12 +221,8 @@ endef
 
 $(eval $(call KernelPackage,i2c-mux-gpio))
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
-I2C_MUX_PREFIX:=i2c-mux-
-endif
-
 I2C_MUX_PCA954x_MODULES:= \
-  CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca954x
+  CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
 
 define KernelPackage/i2c-mux-pca954x
   $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
@@ -224,7 +238,7 @@ $(eval $(call KernelPackage,i2c-mux-pca954x))
 
 
 I2C_MUX_PCA9541_MODULES:= \
-  CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca9541
+  CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
 
 define KernelPackage/i2c-mux-pca9541
   $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
@@ -237,34 +251,3 @@ define KernelPackage/i2c-mux-pca9541/description
 endef
 
 $(eval $(call KernelPackage,i2c-mux-pca9541))
-
-GPIO_PCA953X_MODULES:= \
-  CONFIG_GPIO_PCA953X:drivers/gpio/gpio-pca953x
-
-define KernelPackage/pca953x
-  $(call i2c_defaults,$(GPIO_PCA953X_MODULES),51)
-  TITLE:=Philips PCA953x I2C GPIO extenders
-  DEPENDS:=kmod-i2c-core
-endef
-
-define KernelPackage/pca953x/description
- Kernel modules for PCA953x I2C GPIO extenders
-endef
-
-$(eval $(call KernelPackage,pca953x))
-
-
-GPIO_PCF857X_MODULES:= \
-  CONFIG_GPIO_PCF857X:drivers/gpio/gpio-pcf857x
-
-define KernelPackage/pcf857x
-  $(call i2c_defaults,$(GPIO_PCF857X_MODULES),51)
-  TITLE:=Philips PCF857x I2C GPIO extenders
-  DEPENDS:=kmod-i2c-core
-endef
-
-define KernelPackage/pcf857x/description
- Kernel modules for PCF857x I2C GPIO extenders
-endef
-
-$(eval $(call KernelPackage,pcf857x))