| 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=$(if $(findstring y,$($(call ModuleConfVar,$(1)))),,$(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 | DEPENDS:=@!TARGET_etrax |
| 31 | endef |
| 32 | |
| 33 | define KernelPackage/i2c-core/description |
| 34 | Kernel modules for I2C support |
| 35 | endef |
| 36 | |
| 37 | $(eval $(call KernelPackage,i2c-core)) |
| 38 | |
| 39 | |
| 40 | I2C_ALGOBIT_MODULES:= \ |
| 41 | CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit |
| 42 | |
| 43 | define KernelPackage/i2c-algo-bit |
| 44 | $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55) |
| 45 | TITLE:=I2C bit-banging interfaces |
| 46 | DEPENDS:=kmod-i2c-core |
| 47 | endef |
| 48 | |
| 49 | define KernelPackage/i2c-algo-bit/description |
| 50 | Kernel modules for I2C bit-banging interfaces. |
| 51 | endef |
| 52 | |
| 53 | $(eval $(call KernelPackage,i2c-algo-bit)) |
| 54 | |
| 55 | |
| 56 | I2C_ALGOPCA_MODULES:= \ |
| 57 | CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca |
| 58 | |
| 59 | define KernelPackage/i2c-algo-pca |
| 60 | $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55) |
| 61 | TITLE:=I2C PCA 9564 interfaces |
| 62 | DEPENDS:=kmod-i2c-core |
| 63 | endef |
| 64 | |
| 65 | define KernelPackage/i2c-algo-pca/description |
| 66 | Kernel modules for I2C PCA 9564 interfaces. |
| 67 | endef |
| 68 | |
| 69 | $(eval $(call KernelPackage,i2c-algo-pca)) |
| 70 | |
| 71 | |
| 72 | I2C_ALGOPCF_MODULES:= \ |
| 73 | CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf |
| 74 | |
| 75 | define KernelPackage/i2c-algo-pcf |
| 76 | $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55) |
| 77 | TITLE:=I2C PCF 8584 interfaces |
| 78 | DEPENDS:=kmod-i2c-core |
| 79 | endef |
| 80 | |
| 81 | define KernelPackage/i2c-algo-pcf/description |
| 82 | Kernel modules for I2C PCF 8584 interfaces |
| 83 | endef |
| 84 | |
| 85 | $(eval $(call KernelPackage,i2c-algo-pcf)) |
| 86 | |
| 87 | |
| 88 | I2C_GPIO_MODULES:= \ |
| 89 | CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio |
| 90 | |
| 91 | define KernelPackage/i2c-gpio |
| 92 | $(call i2c_defaults,$(I2C_GPIO_MODULES),59) |
| 93 | TITLE:=GPIO-based bitbanging I2C |
| 94 | DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit |
| 95 | endef |
| 96 | |
| 97 | define KernelPackage/i2c-gpio/description |
| 98 | Kernel modules for a very simple bitbanging I2C driver utilizing the |
| 99 | arch-neutral GPIO API to control the SCL and SDA lines. |
| 100 | endef |
| 101 | |
| 102 | $(eval $(call KernelPackage,i2c-gpio)) |
| 103 | |
| 104 | |
| 105 | OF_I2C_MODULES:=\ |
| 106 | CONFIG_OF_I2C:drivers/of/of_i2c |
| 107 | |
| 108 | define KernelPackage/of-i2c |
| 109 | $(call i2c_defaults,$(OF_I2C_MODULES),58) |
| 110 | TITLE:=OpenFirmware I2C accessors |
| 111 | DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx||TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx \ |
| 112 | kmod-i2c-core |
| 113 | endef |
| 114 | |
| 115 | define KernelPackage/of-i2c/description |
| 116 | Kernel module for OpenFirmware I2C accessors. |
| 117 | endef |
| 118 | |
| 119 | $(eval $(call KernelPackage,of-i2c)) |
| 120 | |
| 121 | I2C_MPC_MODULES:=\ |
| 122 | CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc |
| 123 | |
| 124 | define KernelPackage/i2c-mpc |
| 125 | $(call i2c_defaults,$(I2C_MPC_MODULES),59) |
| 126 | TITLE:=MPC I2C accessors |
| 127 | DEPENDS:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx \ |
| 128 | +kmod-i2c-core +kmod-of-i2c |
| 129 | endef |
| 130 | |
| 131 | define KernelPackage/i2c-mpc/description |
| 132 | Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors. |
| 133 | endef |
| 134 | |
| 135 | $(eval $(call KernelPackage,i2c-mpc)) |
| 136 | |
| 137 | I2C_IBM_IIC_MODULES:=\ |
| 138 | CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic |
| 139 | |
| 140 | define KernelPackage/i2c-ibm-iic |
| 141 | $(call i2c_defaults,$(OF_I2C_MODULES),59) |
| 142 | TITLE:=IBM PPC 4xx on-chip I2C interface support |
| 143 | DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx +kmod-i2c-core +kmod-of-i2c |
| 144 | endef |
| 145 | |
| 146 | define KernelPackage/i2c-ibm-iic/description |
| 147 | Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems. |
| 148 | endef |
| 149 | |
| 150 | $(eval $(call KernelPackage,i2c-ibm-iic)) |
| 151 | |
| 152 | I2C_MV64XXX_MODULES:=\ |
| 153 | CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx |
| 154 | |
| 155 | define KernelPackage/i2c-mv64xxx |
| 156 | $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59) |
| 157 | TITLE:=Orion Platform I2C interface support |
| 158 | DEPENDS:=@TARGET_kirkwood||TARGET_orion +kmod-i2c-core |
| 159 | endef |
| 160 | |
| 161 | define KernelPackage/i2c-mv64xxx/description |
| 162 | Kernel module for I2C interface on the Kirkwood and Orion |
| 163 | family processors. |
| 164 | endef |
| 165 | |
| 166 | $(eval $(call KernelPackage,i2c-mv64xxx)) |
| 167 | |
| 168 | |
| 169 | I2C_TINY_USB_MODULES:= \ |
| 170 | CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb |
| 171 | |
| 172 | define KernelPackage/i2c-tiny-usb |
| 173 | $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59) |
| 174 | TITLE:=I2C Tiny USB adaptor |
| 175 | DEPENDS:=@USB_SUPPORT kmod-i2c-core |
| 176 | endef |
| 177 | |
| 178 | define KernelPackage/i2c-tiny-usb/description |
| 179 | Kernel module for the I2C Tiny USB adaptor developed |
| 180 | by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb). |
| 181 | endef |
| 182 | |
| 183 | $(eval $(call KernelPackage,i2c-tiny-usb)) |
| 184 | |
| 185 | I2C_MUX_MODULES:= \ |
| 186 | CONFIG_I2C_MUX:drivers/i2c/i2c-mux |
| 187 | |
| 188 | define KernelPackage/i2c-mux |
| 189 | $(call i2c_defaults,$(I2C_MUX_MODULES),51) |
| 190 | TITLE:=I2C bus multiplexing support |
| 191 | DEPENDS:=kmod-i2c-core |
| 192 | endef |
| 193 | |
| 194 | define KernelPackage/i2c-mux/description |
| 195 | Kernel modules for I2C bus multiplexing support. |
| 196 | endef |
| 197 | |
| 198 | $(eval $(call KernelPackage,i2c-mux)) |
| 199 | |
| 200 | I2C_MUX_GPIO_MODULES:= \ |
| 201 | CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/gpio-i2cmux |
| 202 | |
| 203 | define KernelPackage/i2c-mux-gpio |
| 204 | $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51) |
| 205 | TITLE:=GPIO-based I2C mux/switches |
| 206 | DEPENDS:=kmod-i2c-mux |
| 207 | endef |
| 208 | |
| 209 | define KernelPackage/i2c-mux-gpio/description |
| 210 | Kernel modules for GENERIC_GPIO I2C bus mux/switching devices. |
| 211 | endef |
| 212 | |
| 213 | $(eval $(call KernelPackage,i2c-mux-gpio)) |
| 214 | |
| 215 | I2C_MUX_PCA954x_MODULES:= \ |
| 216 | CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/pca954x |
| 217 | |
| 218 | define KernelPackage/i2c-mux-pca954x |
| 219 | $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51) |
| 220 | TITLE:=Philips PCA954x I2C mux/switches |
| 221 | DEPENDS:=kmod-i2c-mux |
| 222 | endef |
| 223 | |
| 224 | define KernelPackage/i2c-mux-pca954x/description |
| 225 | Kernel modules for PCA954x I2C bus mux/switching devices. |
| 226 | endef |
| 227 | |
| 228 | $(eval $(call KernelPackage,i2c-mux-pca954x)) |
| 229 | ## Support for pca954x seems to be in kernel since 2.6.36 |
| 230 | |
| 231 | I2C_MUX_PCA9541_MODULES:= \ |
| 232 | CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/pca9541 |
| 233 | |
| 234 | define KernelPackage/i2c-mux-pca9541 |
| 235 | $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51) |
| 236 | TITLE:=Philips PCA9541 I2C mux/switches |
| 237 | DEPENDS:=kmod-i2c-mux |
| 238 | endef |
| 239 | |
| 240 | define KernelPackage/i2c-mux-pca9541/description |
| 241 | Kernel modules for PCA9541 I2C bus mux/switching devices. |
| 242 | endef |
| 243 | |
| 244 | $(eval $(call KernelPackage,i2c-mux-pca9541)) |
| 245 | |
| 246 | GPIO_PCA953X_MODULES:= \ |
| 247 | CONFIG_GPIO_PCA953X:drivers/gpio/gpio-pca953x |
| 248 | |
| 249 | define KernelPackage/pca953x |
| 250 | $(call i2c_defaults,$(GPIO_PCA953X_MODULES),51) |
| 251 | TITLE:=Philips PCA953x I2C GPIO extenders |
| 252 | DEPENDS:=kmod-i2c-core |
| 253 | endef |
| 254 | |
| 255 | define KernelPackage/pca953x/description |
| 256 | Kernel modules for PCA953x I2C GPIO extenders. |
| 257 | endef |
| 258 | |
| 259 | $(eval $(call KernelPackage,pca953x)) |
| 260 | |
| 261 | GPIO_PCF857X_MODULES:= \ |
| 262 | CONFIG_GPIO_PCF857X:drivers/gpio/gpio-pcf857x |
| 263 | |
| 264 | define KernelPackage/pcf857x |
| 265 | $(call i2c_defaults,$(GPIO_PCF857X_MODULES),51) |
| 266 | TITLE:=Philips PCF857x I2C GPIO extenders |
| 267 | DEPENDS:=kmod-i2c-core |
| 268 | endef |
| 269 | |
| 270 | define KernelPackage/pcf857x/description |
| 271 | Kernel modules for PCF857x I2C GPIO extenders. |
| 272 | endef |
| 273 | |
| 274 | $(eval $(call KernelPackage,pcf857x)) |
| 275 | |