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