2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
10 ModuleConfVar=$(word 1,$(subst :,$(space),$(1)))
11 ModuleFullPath=$(LINUX_DIR)/$(word 2,$(subst :,$(space),$(1))).ko
12 ModuleKconfig=$(foreach mod,$(1),$(call ModuleConfVar,$(mod)))
13 ModuleFiles=$(foreach mod,$(1),$(call ModuleFullPath,$(mod)))
14 ModuleAuto=$(call AutoLoad,$(1),$(foreach mod,$(2),$(basename $(notdir $(call ModuleFullPath,$(mod))))),$(3))
18 KCONFIG:=$(call ModuleKconfig,$(1))
19 FILES:=$(call ModuleFiles,$(1))
20 AUTOLOAD:=$(call ModuleAuto,$(2),$(1),$(3))
24 CONFIG_I2C:drivers/i2c/i2c-core \
25 CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
27 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1)
29 I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
33 define KernelPackage/i2c-core
34 $(call i2c_defaults,$(I2C_CORE_MODULES),51)
38 define KernelPackage/i2c-core/description
39 Kernel modules for I2C support
42 $(eval $(call KernelPackage,i2c-core))
45 I2C_ALGOBIT_MODULES:= \
46 CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
48 define KernelPackage/i2c-algo-bit
49 $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55)
50 TITLE:=I2C bit-banging interfaces
51 DEPENDS:=kmod-i2c-core
54 define KernelPackage/i2c-algo-bit/description
55 Kernel modules for I2C bit-banging interfaces
58 $(eval $(call KernelPackage,i2c-algo-bit))
61 I2C_ALGOPCA_MODULES:= \
62 CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
64 define KernelPackage/i2c-algo-pca
65 $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55)
66 TITLE:=I2C PCA 9564 interfaces
67 DEPENDS:=kmod-i2c-core
70 define KernelPackage/i2c-algo-pca/description
71 Kernel modules for I2C PCA 9564 interfaces
74 $(eval $(call KernelPackage,i2c-algo-pca))
77 I2C_ALGOPCF_MODULES:= \
78 CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
80 define KernelPackage/i2c-algo-pcf
81 $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55)
82 TITLE:=I2C PCF 8584 interfaces
83 DEPENDS:=kmod-i2c-core
86 define KernelPackage/i2c-algo-pcf/description
87 Kernel modules for I2C PCF 8584 interfaces
90 $(eval $(call KernelPackage,i2c-algo-pcf))
94 CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
96 define KernelPackage/i2c-gpio
97 $(call i2c_defaults,$(I2C_GPIO_MODULES),59)
98 TITLE:=GPIO-based bitbanging I2C
99 DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit
102 define KernelPackage/i2c-gpio/description
103 Kernel modules for a very simple bitbanging I2C driver utilizing the
104 arch-neutral GPIO API to control the SCL and SDA lines.
107 $(eval $(call KernelPackage,i2c-gpio))
110 CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc
112 define KernelPackage/i2c-mpc
113 $(call i2c_defaults,$(I2C_MPC_MODULES),59)
114 TITLE:=MPC I2C accessors
115 DEPENDS:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx +kmod-i2c-core
118 define KernelPackage/i2c-mpc/description
119 Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors
122 $(eval $(call KernelPackage,i2c-mpc))
124 I2C_IBM_IIC_MODULES:=\
125 CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic
127 define KernelPackage/i2c-ibm-iic
128 $(call i2c_defaults,$(OF_I2C_MODULES),59)
129 TITLE:=IBM PPC 4xx on-chip I2C interface support
130 DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx +kmod-i2c-core
133 define KernelPackage/i2c-ibm-iic/description
134 Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems
137 $(eval $(call KernelPackage,i2c-ibm-iic))
139 I2C_MV64XXX_MODULES:=\
140 CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx
142 define KernelPackage/i2c-mv64xxx
143 $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59)
144 TITLE:=Orion Platform I2C interface support
145 DEPENDS:=@TARGET_kirkwood||TARGET_orion||TARGET_mvebu +kmod-i2c-core
148 define KernelPackage/i2c-mv64xxx/description
149 Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
153 $(eval $(call KernelPackage,i2c-mv64xxx))
156 I2C_TINY_USB_MODULES:= \
157 CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
159 define KernelPackage/i2c-tiny-usb
160 $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
161 TITLE:=I2C Tiny USB adaptor
162 DEPENDS:=@USB_SUPPORT kmod-i2c-core +kmod-usb-core
165 define KernelPackage/i2c-tiny-usb/description
166 Kernel module for the I2C Tiny USB adaptor developed
167 by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
170 $(eval $(call KernelPackage,i2c-tiny-usb))
173 I2C_PIIX4_MODULES:= \
174 CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
176 define KernelPackage/i2c-piix4
177 $(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
178 TITLE:=Intel PIIX4 and compatible I2C interfaces
179 DEPENDS:=@PCI_SUPPORT @(x86||x86_64) kmod-i2c-core
182 define KernelPackage/i2c-piix4/description
183 Support for the Intel PIIX4 family of mainboard I2C interfaces,
184 specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
185 ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
186 AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
187 Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
191 $(eval $(call KernelPackage,i2c-piix4))
195 CONFIG_I2C_MUX:drivers/i2c/i2c-mux
197 define KernelPackage/i2c-mux
198 $(call i2c_defaults,$(I2C_MUX_MODULES),51)
199 TITLE:=I2C bus multiplexing support
200 DEPENDS:=kmod-i2c-core
203 define KernelPackage/i2c-mux/description
204 Kernel modules for I2C bus multiplexing support
207 $(eval $(call KernelPackage,i2c-mux))
209 I2C_MUX_GPIO_MODULES:= \
210 CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
212 define KernelPackage/i2c-mux-gpio
213 $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
214 TITLE:=GPIO-based I2C mux/switches
215 DEPENDS:=kmod-i2c-mux
218 define KernelPackage/i2c-mux-gpio/description
219 Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
222 $(eval $(call KernelPackage,i2c-mux-gpio))
224 I2C_MUX_PCA954x_MODULES:= \
225 CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
227 define KernelPackage/i2c-mux-pca954x
228 $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
229 TITLE:=Philips PCA954x I2C mux/switches
230 DEPENDS:=kmod-i2c-mux
233 define KernelPackage/i2c-mux-pca954x/description
234 Kernel modules for PCA954x I2C bus mux/switching devices
237 $(eval $(call KernelPackage,i2c-mux-pca954x))
240 I2C_MUX_PCA9541_MODULES:= \
241 CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca9541
243 define KernelPackage/i2c-mux-pca9541
244 $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
245 TITLE:=Philips PCA9541 I2C mux/switches
246 DEPENDS:=kmod-i2c-mux
249 define KernelPackage/i2c-mux-pca9541/description
250 Kernel modules for PCA9541 I2C bus mux/switching devices
253 $(eval $(call KernelPackage,i2c-mux-pca9541))