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
=$(if
$(findstring y
,$($(call ModuleConfVar
,$(1)))),,$(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 define KernelPackage
/i2c-core
28 $(call i2c_defaults
,$(I2C_CORE_MODULES
),51)
30 DEPENDS
:=@
!TARGET_etrax
33 define KernelPackage
/i2c-core
/description
34 Kernel modules for I2C support
37 $(eval
$(call KernelPackage
,i2c-core
))
40 I2C_ALGOBIT_MODULES
:= \
41 CONFIG_I2C_ALGOBIT
:drivers
/i2c
/algos
/i2c-algo-bit
43 define KernelPackage
/i2c-algo-bit
44 $(call i2c_defaults
,$(I2C_ALGOBIT_MODULES
),55)
45 TITLE
:=I2C bit-banging interfaces
46 DEPENDS
:=kmod-i2c-core
49 define KernelPackage
/i2c-algo-bit
/description
50 Kernel modules for I2C bit-banging interfaces.
53 $(eval
$(call KernelPackage
,i2c-algo-bit
))
56 I2C_ALGOPCA_MODULES
:= \
57 CONFIG_I2C_ALGOPCA
:drivers
/i2c
/algos
/i2c-algo-pca
59 define KernelPackage
/i2c-algo-pca
60 $(call i2c_defaults
,$(I2C_ALGOPCA_MODULES
),55)
61 TITLE
:=I2C PCA
9564 interfaces
62 DEPENDS
:=kmod-i2c-core
65 define KernelPackage
/i2c-algo-pca
/description
66 Kernel modules for I2C PCA
9564 interfaces.
69 $(eval
$(call KernelPackage
,i2c-algo-pca
))
72 I2C_ALGOPCF_MODULES
:= \
73 CONFIG_I2C_ALGOPCF
:drivers
/i2c
/algos
/i2c-algo-pcf
75 define KernelPackage
/i2c-algo-pcf
76 $(call i2c_defaults
,$(I2C_ALGOPCF_MODULES
),55)
77 TITLE
:=I2C PCF
8584 interfaces
78 DEPENDS
:=kmod-i2c-core
81 define KernelPackage
/i2c-algo-pcf
/description
82 Kernel modules for I2C PCF
8584 interfaces
85 $(eval
$(call KernelPackage
,i2c-algo-pcf
))
89 CONFIG_I2C_GPIO
:drivers
/i2c
/busses
/i2c-gpio
91 define KernelPackage
/i2c-gpio
92 $(call i2c_defaults
,$(I2C_GPIO_MODULES
),59)
93 TITLE
:=GPIO-based bitbanging I2C
94 DEPENDS
:=@GPIO_SUPPORT
+kmod-i2c-algo-bit
97 define KernelPackage
/i2c-gpio
/description
98 Kernel modules for a very simple bitbanging I2C driver utilizing the
99 arch-neutral GPIO API to control the SCL and SDA lines.
102 $(eval
$(call KernelPackage
,i2c-gpio
))
106 CONFIG_OF_I2C
:drivers
/of
/of_i2c
108 define KernelPackage
/of-i2c
109 $(call i2c_defaults
,$(OF_I2C_MODULES
),58)
110 TITLE
:=OpenFirmware I2C accessors
111 DEPENDS
:=@TARGET_ppc40x||TARGET_ppc4xx||TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx \
115 define KernelPackage
/of-i2c
/description
116 Kernel module for OpenFirmware I2C accessors.
119 $(eval
$(call KernelPackage
,of-i2c
))
122 CONFIG_I2C_MPC
:drivers
/i2c
/busses
/i2c-mpc
124 define KernelPackage
/i2c-mpc
125 $(call i2c_defaults
,$(I2C_MPC_MODULES
),59)
126 TITLE
:=MPC I2C accessors
127 DEPENDS
:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx \
128 +kmod-i2c-core
+kmod-of-i2c
131 define KernelPackage
/i2c-mpc
/description
132 Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors.
135 $(eval
$(call KernelPackage
,i2c-mpc
))
137 I2C_IBM_IIC_MODULES
:=\
138 CONFIG_I2C_IBM_IIC
:drivers
/i2c
/busses
/i2c-ibm_iic
140 define KernelPackage
/i2c-ibm-iic
141 $(call i2c_defaults
,$(OF_I2C_MODULES
),59)
142 TITLE
:=IBM PPC
4xx on-chip I2C interface support
143 DEPENDS
:=@TARGET_ppc40x||TARGET_ppc4xx
+kmod-i2c-core
+kmod-of-i2c
146 define KernelPackage
/i2c-ibm-iic
/description
147 Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems.
150 $(eval
$(call KernelPackage
,i2c-ibm-iic
))
152 I2C_MV64XXX_MODULES
:=\
153 CONFIG_I2C_MV64XXX
:drivers
/i2c
/busses
/i2c-mv64xxx
155 define KernelPackage
/i2c-mv64xxx
156 $(call i2c_defaults
,$(I2C_MV64XXX_MODULES
),59)
157 TITLE
:=Orion Platform I2C interface support
158 DEPENDS
:=@TARGET_kirkwood||TARGET_orion
+kmod-i2c-core
161 define KernelPackage
/i2c-mv64xxx
/description
162 Kernel module for I2C interface on the Kirkwood and Orion
166 $(eval
$(call KernelPackage
,i2c-mv64xxx
))
170 CONFIG_I2C_AT91
:drivers
/i2c
/busses
/i2c-at91
172 define KernelPackage
/at91-i2c
173 $(call i2c_defaults
,$(I2C_AT91_MODULES
),55)
174 TITLE
:=I2C
(TWI
) master driver for Atmel AT91
175 DEPENDS
:=@TARGET_at91
+kmod-i2c-core
178 define KernelPackage
/at91-i2c
/description
179 Kernel module to use the I2C
(TWI
) master driver for Atmel AT91
182 $(eval
$(call KernelPackage
,at91-i2c
))
184 I2C_OCTEON_MODULES
:=\
185 CONFIG_I2C_OCTEON
:drivers
/i2c
/busses
/i2c-octeon
187 define KernelPackage
/octeon-i2c
188 $(call i2c_defaults
,$(I2C_OCTEON_MODULES
),59)
189 TITLE
:=I2C master driver for Cavium Octeon
190 DEPENDS
:=@TARGET_octeon
+kmod-i2c-core
193 define KernelPackage
/octeon-i2c
/description
194 Kernel module to use the I2C master driver on Cavium Octeon
197 $(eval
$(call KernelPackage
,octeon-i2c
))
200 I2C_TINY_USB_MODULES
:= \
201 CONFIG_I2C_TINY_USB
:drivers
/i2c
/busses
/i2c-tiny-usb
203 define KernelPackage
/i2c-tiny-usb
204 $(call i2c_defaults
,$(I2C_TINY_USB_MODULES
),59)
205 TITLE
:=I2C Tiny USB adaptor
206 DEPENDS
:=@USB_SUPPORT kmod-i2c-core
209 define KernelPackage
/i2c-tiny-usb
/description
210 Kernel module for the I2C Tiny USB adaptor developed
211 by Till Harbaum
(http
://www.harbaum.org
/till
/i2c_tiny_usb
).
214 $(eval
$(call KernelPackage
,i2c-tiny-usb
))
217 CONFIG_I2C_MUX
:drivers
/i2c
/i2c-mux
219 define KernelPackage
/i2c-mux
220 $(call i2c_defaults
,$(I2C_MUX_MODULES
),51)
221 TITLE
:=I2C bus multiplexing support
222 DEPENDS
:=kmod-i2c-core
225 define KernelPackage
/i2c-mux
/description
226 Kernel modules for I2C bus multiplexing support.
229 $(eval
$(call KernelPackage
,i2c-mux
))
231 I2C_MUX_GPIO_MODULES
:= \
232 CONFIG_I2C_MUX_GPIO
:drivers
/i2c
/muxes
/gpio-i2cmux
234 define KernelPackage
/i2c-mux-gpio
235 $(call i2c_defaults
,$(I2C_MUX_GPIO_MODULES
),51)
236 TITLE
:=GPIO-based I2C mux
/switches
237 DEPENDS
:=kmod-i2c-mux
240 define KernelPackage
/i2c-mux-gpio
/description
241 Kernel modules for GENERIC_GPIO I2C bus mux
/switching devices.
244 $(eval
$(call KernelPackage
,i2c-mux-gpio
))
246 I2C_MUX_PCA954x_MODULES
:= \
247 CONFIG_I2C_MUX_PCA954x
:drivers
/i2c
/muxes
/pca954x
249 define KernelPackage
/i2c-mux-pca954x
250 $(call i2c_defaults
,$(I2C_MUX_PCA954x_MODULES
),51)
251 TITLE
:=Philips PCA954x I2C mux
/switches
252 DEPENDS
:=kmod-i2c-mux
255 define KernelPackage
/i2c-mux-pca954x
/description
256 Kernel modules for PCA954x I2C bus mux
/switching devices.
259 $(eval
$(call KernelPackage
,i2c-mux-pca954x
))
260 ## Support for pca954x seems to be in kernel since 2.6.36
262 I2C_MUX_PCA9541_MODULES
:= \
263 CONFIG_I2C_MUX_PCA9541
:drivers
/i2c
/muxes
/pca9541
265 define KernelPackage
/i2c-mux-pca9541
266 $(call i2c_defaults
,$(I2C_MUX_PCA9541_MODULES
),51)
267 TITLE
:=Philips PCA9541 I2C mux
/switches
268 DEPENDS
:=kmod-i2c-mux
271 define KernelPackage
/i2c-mux-pca9541
/description
272 Kernel modules for PCA9541 I2C bus mux
/switching devices.
275 $(eval
$(call KernelPackage
,i2c-mux-pca9541
))
277 GPIO_PCA953X_MODULES
:= \
278 CONFIG_GPIO_PCA953X
:drivers
/gpio
/gpio-pca953x
280 define KernelPackage
/pca953x
281 $(call i2c_defaults
,$(GPIO_PCA953X_MODULES
),51)
282 TITLE
:=Philips PCA953x I2C GPIO extenders
283 DEPENDS
:=kmod-i2c-core
286 define KernelPackage
/pca953x
/description
287 Kernel modules for PCA953x I2C GPIO extenders.
290 $(eval
$(call KernelPackage
,pca953x
))
292 GPIO_PCF857X_MODULES
:= \
293 CONFIG_GPIO_PCF857X
:drivers
/gpio
/gpio-pcf857x
295 define KernelPackage
/pcf857x
296 $(call i2c_defaults
,$(GPIO_PCF857X_MODULES
),51)
297 TITLE
:=Philips PCF857x I2C GPIO extenders
298 DEPENDS
:=kmod-i2c-core
301 define KernelPackage
/pcf857x
/description
302 Kernel modules for PCF857x I2C GPIO extenders.
305 $(eval
$(call KernelPackage
,pcf857x
))