90eee8b8f5cdec74a3ad4a47301b9b899a64a415
[openwrt/openwrt.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 define KernelPackage/i2c-core
28 $(call i2c_defaults,$(I2C_CORE_MODULES),51)
29 TITLE:=I2C support
30 endef
31
32 define KernelPackage/i2c-core/description
33 Kernel modules for I2C support
34 endef
35
36 $(eval $(call KernelPackage,i2c-core))
37
38
39 I2C_ALGOBIT_MODULES:= \
40 CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
41
42 define KernelPackage/i2c-algo-bit
43 $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55)
44 TITLE:=I2C bit-banging interfaces
45 DEPENDS:=+kmod-i2c-core
46 endef
47
48 define KernelPackage/i2c-algo-bit/description
49 Kernel modules for I2C bit-banging interfaces
50 endef
51
52 $(eval $(call KernelPackage,i2c-algo-bit))
53
54
55 I2C_ALGOPCA_MODULES:= \
56 CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
57
58 define KernelPackage/i2c-algo-pca
59 $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55)
60 TITLE:=I2C PCA 9564 interfaces
61 DEPENDS:=+kmod-i2c-core
62 endef
63
64 define KernelPackage/i2c-algo-pca/description
65 Kernel modules for I2C PCA 9564 interfaces
66 endef
67
68 $(eval $(call KernelPackage,i2c-algo-pca))
69
70
71 I2C_ALGOPCF_MODULES:= \
72 CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
73
74 define KernelPackage/i2c-algo-pcf
75 $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55)
76 TITLE:=I2C PCF 8584 interfaces
77 DEPENDS:=+kmod-i2c-core
78 endef
79
80 define KernelPackage/i2c-algo-pcf/description
81 Kernel modules for I2C PCF 8584 interfaces
82 endef
83
84 $(eval $(call KernelPackage,i2c-algo-pcf))
85
86
87 I2C_GPIO_MODULES:= \
88 CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
89
90 define KernelPackage/i2c-gpio
91 $(call i2c_defaults,$(I2C_GPIO_MODULES),59)
92 TITLE:=GPIO-based bitbanging I2C
93 DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit
94 endef
95
96 define KernelPackage/i2c-gpio/description
97 Kernel modules for a very simple bitbanging I2C driver utilizing the
98 arch-neutral GPIO API to control the SCL and SDA lines.
99 endef
100
101 $(eval $(call KernelPackage,i2c-gpio))
102
103
104 I2C_I801_MODULES:= \
105 CONFIG_I2C_I801:drivers/i2c/busses/i2c-i801
106
107 define KernelPackage/i2c-i801
108 $(call i2c_defaults,$(I2C_I801_MODULES),59)
109 TITLE:=Intel I801 and compatible I2C interfaces
110 DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core +kmod-i2c-smbus
111 endef
112
113 define KernelPackage/i2c-i801/description
114 Support for the Intel I801 family of mainboard I2C interfaces,
115 specifically 82801AA, 82801AB, 82801BA, 82801CA/CAM, 82801DB,
116 82801EB/ER (ICH5/ICH5R), 6300ESB, ICH6, ICH7, ESB2, ICH8, ICH9,
117 EP80579 (Tolapai), ICH10, 5/3400 Series (PCH), 6 Series (PCH),
118 Patsburg (PCH), DH89xxCC (PCH), Panther Point (PCH),
119 Lynx Point (PCH), Lynx Point-LP (PCH), Avoton (SOC),
120 Wellsburg (PCH), Coleto Creek (PCH), Wildcat Point (PCH),
121 Wildcat Point-LP (PCH), BayTrail (SOC), Sunrise Point-H (PCH),
122 Sunrise Point-LP (PCH), DNV (SOC), Broxton (SOC),
123 Lewisburg (PCH).
124 endef
125
126 $(eval $(call KernelPackage,i2c-i801))
127
128
129 I2C_MUX_MODULES:= \
130 CONFIG_I2C_MUX:drivers/i2c/i2c-mux
131
132 define KernelPackage/i2c-mux
133 $(call i2c_defaults,$(I2C_MUX_MODULES),51)
134 TITLE:=I2C bus multiplexing support
135 DEPENDS:=+kmod-i2c-core
136 endef
137
138 define KernelPackage/i2c-mux/description
139 Kernel modules for I2C bus multiplexing support
140 endef
141
142 $(eval $(call KernelPackage,i2c-mux))
143
144 I2C_MUX_GPIO_MODULES:= \
145 CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
146
147 define KernelPackage/i2c-mux-gpio
148 $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
149 TITLE:=GPIO-based I2C mux/switches
150 DEPENDS:=kmod-i2c-mux
151 endef
152
153 define KernelPackage/i2c-mux-gpio/description
154 Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
155 endef
156
157 $(eval $(call KernelPackage,i2c-mux-gpio))
158
159
160 I2C_MUX_PCA9541_MODULES:= \
161 CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
162
163 define KernelPackage/i2c-mux-pca9541
164 $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
165 TITLE:=Philips PCA9541 I2C mux/switches
166 DEPENDS:=kmod-i2c-mux
167 endef
168
169 define KernelPackage/i2c-mux-pca9541/description
170 Kernel modules for PCA9541 I2C bus mux/switching devices
171 endef
172
173 $(eval $(call KernelPackage,i2c-mux-pca9541))
174
175 I2C_MUX_PCA954x_MODULES:= \
176 CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
177
178 define KernelPackage/i2c-mux-pca954x
179 $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
180 TITLE:=Philips PCA954x I2C mux/switches
181 DEPENDS:=kmod-i2c-mux
182 endef
183
184 define KernelPackage/i2c-mux-pca954x/description
185 Kernel modules for PCA954x I2C bus mux/switching devices
186 endef
187
188 $(eval $(call KernelPackage,i2c-mux-pca954x))
189
190
191 I2C_PIIX4_MODULES:= \
192 CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
193
194 define KernelPackage/i2c-piix4
195 $(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
196 TITLE:=Intel PIIX4 and compatible I2C interfaces
197 DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core
198 endef
199
200 define KernelPackage/i2c-piix4/description
201 Support for the Intel PIIX4 family of mainboard I2C interfaces,
202 specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
203 ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
204 AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
205 Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
206 SMSC Victory66.
207 endef
208
209 $(eval $(call KernelPackage,i2c-piix4))
210
211
212 I2C_PXA_MODULES:= \
213 CONFIG_I2C_PXA_SLAVE=y \
214 CONFIG_I2C_PXA:drivers/i2c/busses/i2c-pxa
215
216 define KernelPackage/i2c-pxa
217 $(call i2c_defaults,$(I2C_PXA_MODULES),50)
218 TITLE:=Intel PXA I2C bus driver
219 DEPENDS:=+kmod-i2c-core
220 endef
221
222 define KernelPackage/i2c-pxa/description
223 Kernel module for Intel PXA2XX I2C adapter
224 endef
225
226 $(eval $(call KernelPackage,i2c-pxa))
227
228
229 I2C_SMBUS_MODULES:= \
230 CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus
231
232 define KernelPackage/i2c-smbus
233 $(call i2c_defaults,$(I2C_SMBUS_MODULES),58)
234 TITLE:=SMBus-specific protocols helper
235 DEPENDS:=+kmod-i2c-core
236 endef
237
238 define KernelPackage/i2c-smbus/description
239 Support for the SMBus extensions to the I2C specification.
240 endef
241
242 $(eval $(call KernelPackage,i2c-smbus))
243
244
245
246 I2C_TINY_USB_MODULES:= \
247 CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
248
249 define KernelPackage/i2c-tiny-usb
250 $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
251 TITLE:=I2C Tiny USB adaptor
252 DEPENDS:=@USB_SUPPORT +kmod-i2c-core +kmod-usb-core
253 endef
254
255 define KernelPackage/i2c-tiny-usb/description
256 Kernel module for the I2C Tiny USB adaptor developed
257 by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
258 endef
259
260 $(eval $(call KernelPackage,i2c-tiny-usb))
261
262