rationalize (and fix) dependencies for usb modules
[openwrt/svn-archive/archive.git] / package / kernel / modules / usb.mk
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 USBMENU:=USB Support
10
11 # This is 2.6.22 specific
12 #ifeq ($(KERNEL),2.4)
13 USBNET_DIR=usb/net
14 #else
15 # USBNET_DIR=net/usb
16 #endif
17
18 define usbdep
19 SUBMENU:=$(USBMENU)
20 DEPENDS:=kmod-usb-core $(1)
21 endef
22
23 define KernelPackage/usb-core
24 TITLE:=Support for USB
25 DESCRIPTION:=Kernel support for USB
26 DEPENDS:=@USB_SUPPORT
27 KCONFIG:=$(CONFIG_USB)
28 SUBMENU:=$(USBMENU)
29 AUTOLOAD:=$(call AutoLoad,20,usbcore)
30 endef
31
32 define KernelPackage/usb-core/2.4
33 FILES:=$(LINUX_DIR)/drivers/usb/usbcore.$(LINUX_KMOD_SUFFIX)
34 endef
35
36 define KernelPackage/usb-core/2.6
37 FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.$(LINUX_KMOD_SUFFIX)
38 endef
39 $(eval $(call KernelPackage,usb-core))
40
41
42 define KernelPackage/usb-uhci
43 $(call usbdep,)
44 TITLE:=Support for UHCI controllers
45 DESCRIPTION:=Kernel support for USB UHCI controllers
46 endef
47
48 define KernelPackage/usb-uhci/2.4
49 FILES:=$(LINUX_DIR)/drivers/usb/host/uhci.o
50 KCONFIG:=$(CONFIG_USB_UHCI_ALT)
51 AUTOLOAD:=$(call AutoLoad,50,uhci)
52 endef
53
54 define KernelPackage/usb-uhci/2.6
55 FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko
56 KCONFIG:=$(CONFIG_USB_UHCI_HCD)
57 AUTOLOAD:=$(call AutoLoad,50,uhci-hcd)
58 endef
59 $(eval $(call KernelPackage,usb-uhci))
60
61 define KernelPackage/usb-uhci-iv
62 $(call usbdep,@LINUX_2_4)
63 TITLE:=Support for Intel/VIA UHCI controllers
64 DESCRIPTION:=Kernel support for Intel/VIA USB UHCI controllers
65 endef
66
67 define KernelPackage/usb-uhci-iv/2.4
68 FILES:=$(LINUX_DIR)/drivers/usb/host/usb-uhci.$(LINUX_KMOD_SUFFIX)
69 KCONFIG:=$(CONFIG_USB_UHCI)
70 AUTOLOAD:=$(call AutoLoad,50,usb-uhci)
71 endef
72 $(eval $(call KernelPackage,usb-uhci-iv))
73
74 define KernelPackage/usb-ohci
75 $(call usbdep,)
76 TITLE:=Support for OHCI controllers
77 DESCRIPTION:=Kernel support for USB OHCI controllers
78 endef
79
80 define KernelPackage/usb-ohci/2.4
81 FILES:=$(LINUX_DIR)/drivers/usb/host/usb-ohci.o
82 KCONFIG:=$(CONFIG_USB_OHCI)
83 AUTOLOAD:=$(call AutoLoad,50,usb-ohci)
84 endef
85
86 define KernelPackage/usb-ohci/2.6
87 FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko
88 KCONFIG:=$(CONFIG_USB_OHCI_HCD)
89 AUTOLOAD:=$(call AutoLoad,50,ohci-hcd)
90 endef
91 $(eval $(call KernelPackage,usb-ohci))
92
93 define KernelPackage/usb2
94 $(call usbdep,)
95 TITLE:=Support for USB2 controllers
96 DESCRIPTION:=Kernel support for USB2 (EHCI) controllers
97 FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-hcd.$(LINUX_KMOD_SUFFIX)
98 KCONFIG:=$(CONFIG_USB_EHCI_HCD)
99 AUTOLOAD:=$(call AutoLoad,50,ehci-hcd)
100 endef
101 $(eval $(call KernelPackage,usb2))
102
103
104 define KernelPackage/usb-acm
105 $(call usbdep,)
106 TITLE:=Support for modems/isdn controllers
107 DESCRIPTION:=Kernel support for USB ACM devices (modems/isdn controllers)
108 KCONFIG:=$(CONFIG_USB_ACM)
109 endef
110
111 define KernelPackage/usb-acm/2.4
112 FILES:=$(LINUX_DIR)/drivers/usb/acm.o
113 AUTOLOAD:=$(call AutoLoad,60,acm)
114 endef
115
116 define KernelPackage/usb-acm/2.6
117 FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-acm.ko
118 AUTOLOAD:=$(call AutoLoad,60,cdc-acm)
119 endef
120 $(eval $(call KernelPackage,usb-acm))
121
122
123 define KernelPackage/usb-audio
124 $(call usbdep,+kmod-soundcore)
125 TITLE:=Support for audio devices
126 DESCRIPTION:=Kernel support for USB audio devices
127 endef
128
129 define KernelPackage/usb-audio/2.4
130 KCONFIG:=$(CONFIG_USB_AUDIO)
131 FILES:=$(LINUX_DIR)/drivers/usb/audio.o
132 AUTOLOAD:=$(call AutoLoad,60,audio)
133 endef
134
135 define KernelPackage/usb-audio/2.6
136 KCONFIG:=$(CONFIG_SND_USB_AUDIO)
137 FILES:= \
138 $(LINUX_DIR)/sound/usb/snd-usb-lib.ko \
139 $(LINUX_DIR)/sound/usb/snd-usb-audio.ko
140 AUTOLOAD:=$(call AutoLoad,60,snd-usb-lib snd-usb-audio)
141 endef
142 $(eval $(call KernelPackage,usb-audio))
143
144
145 define KernelPackage/usb-printer
146 $(call usbdep,)
147 TITLE:=Support for printers
148 DESCRIPTION:=Kernel support for USB printers
149 KCONFIG:=$(CONFIG_USB_PRINTER)
150 endef
151
152 define KernelPackage/usb-printer/2.4
153 FILES:=$(LINUX_DIR)/drivers/usb/printer.o
154 AUTOLOAD:=$(call AutoLoad,60,printer)
155 endef
156
157 define KernelPackage/usb-printer/2.6
158 FILES:=$(LINUX_DIR)/drivers/usb/class/usblp.ko
159 AUTOLOAD:=$(call AutoLoad,60,usblp)
160 endef
161 $(eval $(call KernelPackage,usb-printer))
162
163
164 define KernelPackage/usb-serial
165 $(call usbdep,)
166 TITLE:=Support for USB-to-Serial converters
167 DESCRIPTION:=Kernel support for USB-to-Serial converters
168 KCONFIG:=$(CONFIG_USB_SERIAL)
169 FILES:=$(LINUX_DIR)/drivers/usb/serial/usbserial.$(LINUX_KMOD_SUFFIX)
170 AUTOLOAD:=$(call AutoLoad,60,usbserial)
171 endef
172 $(eval $(call KernelPackage,usb-serial))
173
174 define KernelPackage/usb-serial-airprime
175 $(call usbdep,kmod-usb-serial)
176 TITLE:=Support for Airprime (EVDO)
177 DESCRIPTION:=Kernel support for Airprime (EVDO)
178 KCONFIG:=$(CONFIG_USB_SERIAL_AIRPRIME)
179 FILES:=$(LINUX_DIR)/drivers/usb/serial/airprime.$(LINUX_KMOD_SUFFIX)
180 AUTOLOAD:=$(call AutoLoad,65,airprime)
181 endef
182 $(eval $(call KernelPackage,usb-serial-airprime))
183
184 define KernelPackage/usb-serial-belkin
185 $(call usbdep,kmod-usb-serial)
186 TITLE:=Support for Belkin devices
187 DESCRIPTION:=Kernel support for Belkin USB-to-Serial converters
188 KCONFIG:=$(CONFIG_USB_SERIAL_BELKIN)
189 FILES:=$(LINUX_DIR)/drivers/usb/serial/belkin_sa.$(LINUX_KMOD_SUFFIX)
190 AUTOLOAD:=$(call AutoLoad,65,belkin_sa)
191 endef
192 $(eval $(call KernelPackage,usb-serial-belkin))
193
194
195 define KernelPackage/usb-serial-ftdi
196 $(call usbdep,kmod-usb-serial)
197 TITLE:=Support for FTDI devices
198 DESCRIPTION:=Kernel support for FTDI USB-to-Serial converters
199 KCONFIG:=$(CONFIG_USB_SERIAL_FTDI_SIO)
200 FILES:=$(LINUX_DIR)/drivers/usb/serial/ftdi_sio.$(LINUX_KMOD_SUFFIX)
201 AUTOLOAD:=$(call AutoLoad,65,ftdi_sio)
202 endef
203 $(eval $(call KernelPackage,usb-serial-ftdi))
204
205
206 define KernelPackage/usb-serial-mct
207 $(call usbdep,kmod-usb-serial)
208 TITLE:=Support for Magic Control Tech. devices
209 DESCRIPTION:=Kernel support for Magic Control Technology USB-to-Serial converters
210 KCONFIG:=$(CONFIG_USB_SERIAL_MCT_U232)
211 FILES:=$(LINUX_DIR)/drivers/usb/serial/mct_u232.$(LINUX_KMOD_SUFFIX)
212 AUTOLOAD:=$(call AutoLoad,65,mct_u232)
213 endef
214 $(eval $(call KernelPackage,usb-serial-mct))
215
216 define KernelPackage/usb-serial-pl2303
217 $(call usbdep,kmod-usb-serial)
218 TITLE:=Support for Prolific PL2303 devices
219 DESCRIPTION:=Kernel support for Prolific PL2303 USB-to-Serial converters
220 KCONFIG:=$(CONFIG_USB_SERIAL_PL2303)
221 FILES:=$(LINUX_DIR)/drivers/usb/serial/pl2303.$(LINUX_KMOD_SUFFIX)
222 AUTOLOAD:=$(call AutoLoad,65,pl2303)
223 endef
224 $(eval $(call KernelPackage,usb-serial-pl2303))
225
226
227 define KernelPackage/usb-serial-sierrawireless
228 $(call usbdep,kmod-usb-serial)
229 TITLE:=Support for Sierra Wireless devices
230 DESCRIPTION:=Kernel support for Sierra Wireless devices
231 KCONFIG:=$(CONFIG_USB_SERIAL_SIERRAWIRELESS)
232 FILES:=$(LINUX_DIR)/drivers/usb/serial/sierra.$(LINUX_KMOD_SUFFIX)
233 AUTOLOAD:=$(call AutoLoad,65,sierra)
234 endef
235 $(eval $(call KernelPackage,usb-serial-sierrawireless))
236
237
238 define KernelPackage/usb-serial-visor
239 $(call usbdep,kmod-usb-serial)
240 TITLE:=Support for Handspring Visor devices
241 DESCRIPTION:=Kernel support for Handspring Visor PDAs
242 KCONFIG:=$(CONFIG_USB_SERIAL_VISOR)
243 FILES:=$(LINUX_DIR)/drivers/usb/serial/visor.$(LINUX_KMOD_SUFFIX)
244 AUTOLOAD:=$(call AutoLoad,65,visor)
245 endef
246 $(eval $(call KernelPackage,usb-serial-visor))
247
248
249 define KernelPackage/usb-storage
250 $(call usbdep,+kmod-scsi-core)
251 TITLE:=USB Storage support
252 DESCRIPTION:=Kernel support for USB Mass Storage devices
253 KCONFIG:=$(CONFIG_USB_STORAGE)
254 FILES:= \
255 $(LINUX_DIR)/drivers/usb/storage/usb-storage.$(LINUX_KMOD_SUFFIX)
256 AUTOLOAD:=$(call AutoLoad,60,scsi_mod sd_mod usb-storage)
257 endef
258 $(eval $(call KernelPackage,usb-storage))
259
260 define KernelPackage/usb-atm
261 $(call usbdep,@LINUX_2_6 kmod-atm)
262 TITLE:=Support for ATM on USB bus
263 DESCRIPTION:=Kernel support for USB DSL modems
264 KCONFIG:=$(CONFIG_USB_ATM)
265 FILES:=$(LINUX_DIR)/drivers/usb/atm/usbatm.$(LINUX_KMOD_SUFFIX)
266 AUTOLOAD:=$(call AutoLoad,60,usbatm)
267 endef
268 $(eval $(call KernelPackage,usb-atm))
269
270 define KernelPackage/usb-speedtouch
271 $(call usbdep,@LINUX_2_6 kmod-atm)
272 TITLE:=Support for SpeedTouch ADSL modems
273 DESCRIPTION:=Kernel support for SpeedTouch USB ADSL modems
274 KCONFIG:=$(CONFIG_USB_SPEEDTOUCH)
275 FILES:=$(LINUX_DIR)/drivers/usb/atm/speedtch.$(LINUX_KMOD_SUFFIX)
276 AUTOLOAD:=$(call AutoLoad,70,speedtch)
277 endef
278 $(eval $(call KernelPackage,usb-speedtouch))
279
280 define KernelPackage/ueagle-atm
281 $(call usbdep,@LINUX_2_6 kmod-atm)
282 TITLE:=Driver for Eagle 8051 based USB ADSL modems
283 DESCRIPTION:=Kernel support for Eagle 8051 based USB ADSL modems
284 FILES:=$(LINUX_DIR)/drivers/usb/atm/ueagle-atm.$(LINUX_KMOD_SUFFIX)
285 KCONFIG:=$(CONFIG_USB_UEAGLEATM)
286 AUTOLOAD:=$(call AutoLoad,70,ueagle-atm)
287 endef
288 $(eval $(call KernelPackage,ueagle-atm))
289
290 define KernelPackage/usb-pwc
291 $(call usbdep,+kmod-videodev)
292 TITLE:=Philips WebCam driver
293 DESCRIPTION:=Kernel modules for supporting Philips WebCam USB devices
294 KCONFIG:=$(CONFIG_USB_PWC)
295 AUTOLOAD:=$(call AutoLoad,70,pwc)
296 endef
297
298 define KernelPackage/usb-pwc/2.4
299 FILES:=$(LINUX_DIR)/drivers/usb/pwc.$(LINUX_KMOD_SUFFIX)
300 endef
301
302 define KernelPackage/usb-pwc/2.6
303 FILES:=$(LINUX_DIR)/drivers/usb/media/pwc/pwc.$(LINUX_KMOD_SUFFIX)
304 endef
305 $(eval $(call KernelPackage,usb-pwc))
306
307 define KernelPackage/usb-net
308 $(call usbdep,)
309 TITLE:=Kernel modules for USB-to-Ethernet convertors
310 DESCRIPTION:=Kernel modules for USB-to-Ethernet convertors
311 KCONFIG:=$(CONFIG_USB_USBNET)
312 AUTOLOAD:=$(call Autoload,60, usbnet)
313 endef
314
315 define KernelPackage/usb-net/2.4
316 FILES:=$(LINUX_DIR)/drivers/usb/usbnet.$(LINUX_KMOD_SUFFIX)
317 endef
318
319 define KernelPackage/usb-net/2.6
320 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.$(LINUX_KMOD_SUFFIX)
321 endef
322
323 $(eval $(call KernelPackage,usb-net))
324
325 define KernelPackage/usb-net-asix
326 $(call usbdep,kmod-usbnet)
327 TITLE:=Kernel module for USB-to-Ethernet Asix convertors
328 DESCRIPTION:=Kernel module for USB-to-Ethernet Asix convertors
329 KCONFIG:=$(CONFIG_USB_NET_AX8817X)
330 endef
331
332 define KernelPackage/usb-net-asix/2.4
333 FILES:=$(LINUX_DIR)/drivers/usb/ax8817x.$(LINUX_KMOD_SUFFIX)
334 AUTOLOAD:=$(call Autoload,61,ax8817x)
335 endef
336
337 define KernelPackage/usb-net-asix/2.6
338 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.$(LINUX_KMOD_SUFFIX)
339 AUTOLOAD:=$(call Autoload,61,asix)
340 endef
341
342 $(eval $(call KernelPackage,usb-net-asix))
343
344 define KernelPackage/usb-net-kaweth
345 $(call usbdep,kmod-usbnet)
346 TITLE:=Kernel module for USB-to-Ethernet Kaweth convertors
347 DESCRIPTION:=Kernel module for USB-to-Ethernet Kaweth convertors
348 KCONFIG:=$(CONFIG_USB_KAWETH)
349 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/kaweth.$(LINUX_KMOD_SUFFIX)
350 AUTOLOAD:=$(call Autoload,61,kaweth)
351 endef
352
353 $(eval $(call KernelPackage,usb-net-kaweth))
354
355 define KernelPackage/usb-net-pegasus
356 $(call usbdep,kmod-usbnet)
357 TITLE:=Kernel module for USB-to-Ethernet Pegasus convertors
358 DESCRIPTION:=Kernel module for USB-to-Ethernet Pegasus convertors
359 KCONFIG:=$(CONFIG_USB_PEGASUS)
360 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/pegasus.$(LINUX_KMOD_SUFFIX)
361 AUTOLOAD:=$(call Autoload,61,pegasus)
362 endef
363
364 $(eval $(call KernelPackage,usb-net-pegasus))
365
366 define KernelPackage/usb-hid
367 $(call usbdep,@LINUX_2_6 +kmod-input-core +kmod-input-evdev)
368 TITLE:=Support for USB Human Input Devices
369 DESCRIPTION:=Kernel support for USB HID devices such as keyboards and mice
370 KCONFIG:=$(CONFIG_USB_HID)
371 AUTOLOAD:=$(call AutoLoad,70,usbhid)
372 endef
373
374 define KernelPackage/usb-hid/2.6
375 FILES:=$(LINUX_DIR)/drivers/usb/input/usbhid.ko
376 endef
377 $(eval $(call KernelPackage,usb-hid))
378
379 define KernelPackage/usb-yealink
380 $(call usbdep,@LINUX_2_6 +kmod-input-core +kmod-input-evdev)
381 TITLE:=USB Yealink VOIP phone
382 DESCRIPTION:=Kernel support for Yealink VOIP phone
383 KCONFIG:=$(CONFIG_USB_YEALINK)
384 FILES:=$(LINUX_DIR)/drivers/usb/input/yealink.ko
385 AUTOLOAD:=$(call AutoLoad,70,yealink)
386 endef
387 $(eval $(call KernelPackage,usb-yealink))
388
389