a2dcf35e5358eae60b09fdaaf803ae3ea7d399a4
[openwrt/svn-archive/archive.git] / package / kernel / linux / modules / i2c.mk
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 I2C_MENU:=I2C support
9
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))
15
16 define i2c_defaults
17 SUBMENU:=$(I2C_MENU)
18 KCONFIG:=$(call ModuleKconfig,$(1))
19 FILES:=$(call ModuleFiles,$(1))
20 AUTOLOAD:=$(call ModuleAuto,$(2),$(1),$(3))
21 endef
22
23 I2C_CORE_MODULES:= \
24 CONFIG_I2C:drivers/i2c/i2c-core \
25 CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
26
27 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,3.12.0)),1)
28 ifeq ($(CONFIG_OF),y)
29 I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
30 endif
31 endif
32
33 define KernelPackage/i2c-core
34 $(call i2c_defaults,$(I2C_CORE_MODULES),51)
35 TITLE:=I2C support
36 endef
37
38 define KernelPackage/i2c-core/description
39 Kernel modules for I2C support
40 endef
41
42 $(eval $(call KernelPackage,i2c-core))
43
44
45 I2C_ALGOBIT_MODULES:= \
46 CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
47
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
52 endef
53
54 define KernelPackage/i2c-algo-bit/description
55 Kernel modules for I2C bit-banging interfaces
56 endef
57
58 $(eval $(call KernelPackage,i2c-algo-bit))
59
60
61 I2C_ALGOPCA_MODULES:= \
62 CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
63
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
68 endef
69
70 define KernelPackage/i2c-algo-pca/description
71 Kernel modules for I2C PCA 9564 interfaces
72 endef
73
74 $(eval $(call KernelPackage,i2c-algo-pca))
75
76
77 I2C_ALGOPCF_MODULES:= \
78 CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
79
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
84 endef
85
86 define KernelPackage/i2c-algo-pcf/description
87 Kernel modules for I2C PCF 8584 interfaces
88 endef
89
90 $(eval $(call KernelPackage,i2c-algo-pcf))
91
92
93 I2C_GPIO_MODULES:= \
94 CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
95
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
100 endef
101
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.
105 endef
106
107 $(eval $(call KernelPackage,i2c-gpio))
108
109 I2C_MPC_MODULES:=\
110 CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc
111
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
116 endef
117
118 define KernelPackage/i2c-mpc/description
119 Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors
120 endef
121
122 $(eval $(call KernelPackage,i2c-mpc))
123
124 I2C_IBM_IIC_MODULES:=\
125 CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic
126
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
131 endef
132
133 define KernelPackage/i2c-ibm-iic/description
134 Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems
135 endef
136
137 $(eval $(call KernelPackage,i2c-ibm-iic))
138
139 I2C_MV64XXX_MODULES:=\
140 CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx
141
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
146 endef
147
148 define KernelPackage/i2c-mv64xxx/description
149 Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
150 family processors
151 endef
152
153 $(eval $(call KernelPackage,i2c-mv64xxx))
154
155
156 I2C_TINY_USB_MODULES:= \
157 CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
158
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
163 endef
164
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)
168 endef
169
170 $(eval $(call KernelPackage,i2c-tiny-usb))
171
172
173 I2C_PIIX4_MODULES:= \
174 CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
175
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
180 endef
181
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
188 SMSC Victory66.
189 endef
190
191 $(eval $(call KernelPackage,i2c-piix4))
192
193
194 I2C_MUX_MODULES:= \
195 CONFIG_I2C_MUX:drivers/i2c/i2c-mux
196
197 define KernelPackage/i2c-mux
198 $(call i2c_defaults,$(I2C_MUX_MODULES),51)
199 TITLE:=I2C bus multiplexing support
200 DEPENDS:=kmod-i2c-core
201 endef
202
203 define KernelPackage/i2c-mux/description
204 Kernel modules for I2C bus multiplexing support
205 endef
206
207 $(eval $(call KernelPackage,i2c-mux))
208
209 I2C_MUX_GPIO_MODULES:= \
210 CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
211
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
216 endef
217
218 define KernelPackage/i2c-mux-gpio/description
219 Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
220 endef
221
222 $(eval $(call KernelPackage,i2c-mux-gpio))
223
224 I2C_MUX_PCA954x_MODULES:= \
225 CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
226
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
231 endef
232
233 define KernelPackage/i2c-mux-pca954x/description
234 Kernel modules for PCA954x I2C bus mux/switching devices
235 endef
236
237 $(eval $(call KernelPackage,i2c-mux-pca954x))
238
239
240 I2C_MUX_PCA9541_MODULES:= \
241 CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/$(I2C_MUX_PREFIX)pca9541
242
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
247 endef
248
249 define KernelPackage/i2c-mux-pca9541/description
250 Kernel modules for PCA9541 I2C bus mux/switching devices
251 endef
252
253 $(eval $(call KernelPackage,i2c-mux-pca9541))