dynamically enable/disable kernel config options for kmod packages based on build...
[openwrt.git] / package / kernel / modules / i2c.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 I2CMENU:=I2C Bus
10
11 define KernelPackage/i2c-core
12   TITLE:=I2C support
13   DESCRIPTION:=Kernel modules for i2c support
14   SUBMENU:=$(I2CMENU)
15   KCONFIG:=CONFIG_I2C
16   FILES:=$(LINUX_DIR)/drivers/i2c/*.$(LINUX_KMOD_SUFFIX)
17   AUTOLOAD:=$(call AutoLoad,50,i2c-core i2c-dev)
18 endef
19 $(eval $(call KernelPackage,i2c-core))
20
21 define KernelPackage/i2c-algos
22   TITLE:=I2C algorithms support
23   DESCRIPTION:=Kernel modules for various i2c algorithms
24   DEPENDS:=kmod-i2c-core
25   SUBMENU:=$(I2CMENU)
26   KCONFIG:=CONFIG_I2C_ALGOBIT
27   FILES:=$(LINUX_DIR)/drivers/i2c/algos/*.$(LINUX_KMOD_SUFFIX)
28   AUTOLOAD:=$(call AutoLoad,60,i2c-algo-bit i2c-algo-pcf i2c-algo-pca)
29 endef
30 $(eval $(call KernelPackage,i2c-algos))
31
32 define KernelPackage/i2c-au1x00gpio
33   TITLE:=I2C GPIO interface for Au1x00 devices
34   DESCRIPTION:=I2C GPIO interface for Au1x00 devices
35   DEFAULT:=y if LINUX_2_6_AU1000
36   DEPENDS:=kmod-i2c-core kmod-i2c-algos @LINUX_2_6_AU1000
37   SUBMENU:=$(I2CMENU)
38   KCONFIG:=CONFIG_I2C_AU1X00GPIO
39   FILES:=$(LINUX_DIR)/drivers/i2c/busses/i2c-au1x00gpio.$(LINUX_KMOD_SUFFIX)
40   AUTOLOAD:=$(call Autoload,70,i2c-au1x00gpio)
41 endef
42 $(eval $(call KernelPackage,i2c-au1x00gpio))
43
44 define KernelPackage/i2c-scx200
45   TITLE:=SCX200 i2c support
46   DESCRIPTION:=Kernel module for SCX200 i2c bus
47   DEFAULT:=y if LINUX_2_6_X86_Soekris
48   DEPENDS:=kmod-i2c-core kmod-i2c-algos @LINUX_2_6_X86_Soekris
49   SUBMENU:=$(I2CMENU)
50   KCONFIG:=CONFIG_SCx200_I2C
51   FILES:=$(LINUX_DIR)/drivers/i2c/busses/scx200_i2c.$(LINUX_KMOD_SUFFIX) \
52         $(LINUX_DIR)/drivers/i2c/busses/i2c-isa.$(LINUX_KMOD_SUFFIX)
53   AUTOLOAD:=$(call AutoLoad,70,i2c-isa scx200_i2c)
54 endef
55 $(eval $(call KernelPackage,i2c-scx200))