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
28 I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
31 define KernelPackage/i2c-core
32 $(call i2c_defaults,$(I2C_CORE_MODULES),51)
36 define KernelPackage/i2c-core/description
37 Kernel modules for I2C support
40 $(eval $(call KernelPackage,i2c-core))
43 I2C_ALGOBIT_MODULES:= \
44 CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
46 define KernelPackage/i2c-algo-bit
47 $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55)
48 TITLE:=I2C bit-banging interfaces
49 DEPENDS:=kmod-i2c-core
52 define KernelPackage/i2c-algo-bit/description
53 Kernel modules for I2C bit-banging interfaces
56 $(eval $(call KernelPackage,i2c-algo-bit))
59 I2C_ALGOPCA_MODULES:= \
60 CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
62 define KernelPackage/i2c-algo-pca
63 $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55)
64 TITLE:=I2C PCA 9564 interfaces
65 DEPENDS:=kmod-i2c-core
68 define KernelPackage/i2c-algo-pca/description
69 Kernel modules for I2C PCA 9564 interfaces
72 $(eval $(call KernelPackage,i2c-algo-pca))
75 I2C_ALGOPCF_MODULES:= \
76 CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
78 define KernelPackage/i2c-algo-pcf
79 $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55)
80 TITLE:=I2C PCF 8584 interfaces
81 DEPENDS:=kmod-i2c-core
84 define KernelPackage/i2c-algo-pcf/description
85 Kernel modules for I2C PCF 8584 interfaces
88 $(eval $(call KernelPackage,i2c-algo-pcf))
92 CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
94 define KernelPackage/i2c-gpio
95 $(call i2c_defaults,$(I2C_GPIO_MODULES),59)
96 TITLE:=GPIO-based bitbanging I2C
97 DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit
100 define KernelPackage/i2c-gpio/description
101 Kernel modules for a very simple bitbanging I2C driver utilizing the
102 arch-neutral GPIO API to control the SCL and SDA lines.
105 $(eval $(call KernelPackage,i2c-gpio))
108 CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc
110 define KernelPackage/i2c-mpc
111 $(call i2c_defaults,$(I2C_MPC_MODULES),59)
112 TITLE:=MPC I2C accessors
113 DEPENDS:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx +kmod-i2c-core
116 define KernelPackage/i2c-mpc/description
117 Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors
120 $(eval $(call KernelPackage,i2c-mpc))
122 I2C_IBM_IIC_MODULES:=\
123 CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic
125 define KernelPackage/i2c-ibm-iic
126 $(call i2c_defaults,$(OF_I2C_MODULES),59)
127 TITLE:=IBM PPC 4xx on-chip I2C interface support
128 DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx +kmod-i2c-core
131 define KernelPackage/i2c-ibm-iic/description
132 Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems
135 $(eval $(call KernelPackage,i2c-ibm-iic))
137 I2C_MV64XXX_MODULES:=\
138 CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx
140 define KernelPackage/i2c-mv64xxx
141 $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59)
142 TITLE:=Orion Platform I2C interface support
143 DEPENDS:=@TARGET_kirkwood||TARGET_orion||TARGET_mvebu +kmod-i2c-core
146 define KernelPackage/i2c-mv64xxx/description
147 Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
151 $(eval $(call KernelPackage,i2c-mv64xxx))
154 I2C_TINY_USB_MODULES:= \
155 CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
157 define KernelPackage/i2c-tiny-usb
158 $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
159 TITLE:=I2C Tiny USB adaptor
160 DEPENDS:=@USB_SUPPORT kmod-i2c-core +kmod-usb-core
163 define KernelPackage/i2c-tiny-usb/description
164 Kernel module for the I2C Tiny USB adaptor developed
165 by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
168 $(eval $(call KernelPackage,i2c-tiny-usb))
171 CONFIG_I2C_MUX:drivers/i2c/i2c-mux
173 define KernelPackage/i2c-mux
174 $(call i2c_defaults,$(I2C_MUX_MODULES),51)
175 TITLE:=I2C bus multiplexing support
176 DEPENDS:=kmod-i2c-core
179 define KernelPackage/i2c-mux/description
180 Kernel modules for I2C bus multiplexing support
183 $(eval $(call KernelPackage,i2c-mux))
185 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
186 I2C_MUX_GPIO_MODULES:= \
187 CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
189 I2C_MUX_GPIO_MODULES:= \
190 CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/gpio-i2cmux
193 define KernelPackage/i2c-mux-gpio
194 $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
195 TITLE:=GPIO-based I2C mux/switches
196 DEPENDS:=kmod-i2c-mux
199 define KernelPackage/i2c-mux-gpio/description
200 Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
203 $(eval $(call KernelPackage,i2c-mux-gpio))
205 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
206 I2C_MUX_PREFIX:=i2c-mux-
209 I2C_MUX_PCA954x_MODULES:= \
210 CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca954x
212 define KernelPackage/i2c-mux-pca954x
213 $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
214 TITLE:=Philips PCA954x I2C mux/switches
215 DEPENDS:=kmod-i2c-mux
218 define KernelPackage/i2c-mux-pca954x/description
219 Kernel modules for PCA954x I2C bus mux/switching devices
222 $(eval $(call KernelPackage,i2c-mux-pca954x))
225 I2C_MUX_PCA9541_MODULES:= \
226 CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca9541
228 define KernelPackage/i2c-mux-pca9541
229 $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
230 TITLE:=Philips PCA9541 I2C mux/switches
231 DEPENDS:=kmod-i2c-mux
234 define KernelPackage/i2c-mux-pca9541/description
235 Kernel modules for PCA9541 I2C bus mux/switching devices
238 $(eval $(call KernelPackage,i2c-mux-pca9541))
240 GPIO_PCA953X_MODULES:= \
241 CONFIG_GPIO_PCA953X:drivers/gpio/gpio-pca953x
243 define KernelPackage/pca953x
244 $(call i2c_defaults,$(GPIO_PCA953X_MODULES),51)
245 TITLE:=Philips PCA953x I2C GPIO extenders
246 DEPENDS:=kmod-i2c-core
249 define KernelPackage/pca953x/description
250 Kernel modules for PCA953x I2C GPIO extenders
253 $(eval $(call KernelPackage,pca953x))
256 GPIO_PCF857X_MODULES:= \
257 CONFIG_GPIO_PCF857X:drivers/gpio/gpio-pcf857x
259 define KernelPackage/pcf857x
260 $(call i2c_defaults,$(GPIO_PCF857X_MODULES),51)
261 TITLE:=Philips PCF857x I2C GPIO extenders
262 DEPENDS:=kmod-i2c-core
265 define KernelPackage/pcf857x/description
266 Kernel modules for PCF857x I2C GPIO extenders
269 $(eval $(call KernelPackage,pcf857x))