| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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_CCGS_UCSI_MODULES:= \ |
| 88 | CONFIG_I2C_CCGX_UCSI:drivers/i2c/busses/i2c-ccgx-ucsi |
| 89 | |
| 90 | define KernelPackage/i2c-ccgs-ucsi |
| 91 | $(call i2c_defaults,$(I2C_CCGS_UCSI_MODULES),58) |
| 92 | TITLE:=Cypress CCGx Type-C controller |
| 93 | DEPENDS:=+kmod-i2c-core +kmod-regmap-core |
| 94 | HIDDEN:=y |
| 95 | endef |
| 96 | |
| 97 | |
| 98 | $(eval $(call KernelPackage,i2c-ccgs-ucsi)) |
| 99 | |
| 100 | |
| 101 | I2C_DWCORE_MODULES:= \ |
| 102 | CONFIG_I2C_DESIGNWARE_CORE:drivers/i2c/busses/i2c-designware-core |
| 103 | |
| 104 | define KernelPackage/i2c-designware-core |
| 105 | $(call i2c_defaults,$(I2C_DWCORE_MODULES),58) |
| 106 | TITLE:=Synopsys DesignWare I2C core |
| 107 | DEPENDS:=+kmod-i2c-core +!LINUX_5_4:kmod-regmap-core |
| 108 | HIDDEN:=y |
| 109 | endef |
| 110 | |
| 111 | $(eval $(call KernelPackage,i2c-designware-core)) |
| 112 | |
| 113 | |
| 114 | I2C_DWPCI_MODULES:= \ |
| 115 | CONFIG_I2C_DESIGNWARE_PCI:drivers/i2c/busses/i2c-designware-pci |
| 116 | |
| 117 | define KernelPackage/i2c-designware-pci |
| 118 | $(call i2c_defaults,$(I2C_DWPCI_MODULES),59) |
| 119 | TITLE:=Synopsys DesignWare PCI |
| 120 | DEPENDS:=@PCI_SUPPORT +kmod-i2c-designware-core +kmod-i2c-ccgs-ucsi |
| 121 | endef |
| 122 | |
| 123 | define KernelPackage/i2c-designware-pci/description |
| 124 | Support for Synopsys DesignWare I2C controller. Only master mode is supported. |
| 125 | endef |
| 126 | |
| 127 | $(eval $(call KernelPackage,i2c-designware-pci)) |
| 128 | |
| 129 | |
| 130 | I2C_GPIO_MODULES:= \ |
| 131 | CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio |
| 132 | |
| 133 | define KernelPackage/i2c-gpio |
| 134 | $(call i2c_defaults,$(I2C_GPIO_MODULES),59) |
| 135 | TITLE:=GPIO-based bitbanging I2C |
| 136 | DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit |
| 137 | endef |
| 138 | |
| 139 | define KernelPackage/i2c-gpio/description |
| 140 | Kernel modules for a very simple bitbanging I2C driver utilizing the |
| 141 | arch-neutral GPIO API to control the SCL and SDA lines. |
| 142 | endef |
| 143 | |
| 144 | $(eval $(call KernelPackage,i2c-gpio)) |
| 145 | |
| 146 | |
| 147 | I2C_I801_MODULES:= \ |
| 148 | CONFIG_I2C_I801:drivers/i2c/busses/i2c-i801 |
| 149 | |
| 150 | define KernelPackage/i2c-i801 |
| 151 | $(call i2c_defaults,$(I2C_I801_MODULES),59) |
| 152 | TITLE:=Intel I801 and compatible I2C interfaces |
| 153 | DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core +kmod-i2c-smbus |
| 154 | endef |
| 155 | |
| 156 | define KernelPackage/i2c-i801/description |
| 157 | Support for the Intel I801 family of mainboard I2C interfaces, |
| 158 | specifically 82801AA, 82801AB, 82801BA, 82801CA/CAM, 82801DB, |
| 159 | 82801EB/ER (ICH5/ICH5R), 6300ESB, ICH6, ICH7, ESB2, ICH8, ICH9, |
| 160 | EP80579 (Tolapai), ICH10, 5/3400 Series (PCH), 6 Series (PCH), |
| 161 | Patsburg (PCH), DH89xxCC (PCH), Panther Point (PCH), |
| 162 | Lynx Point (PCH), Lynx Point-LP (PCH), Avoton (SOC), |
| 163 | Wellsburg (PCH), Coleto Creek (PCH), Wildcat Point (PCH), |
| 164 | Wildcat Point-LP (PCH), BayTrail (SOC), Sunrise Point-H (PCH), |
| 165 | Sunrise Point-LP (PCH), DNV (SOC), Broxton (SOC), |
| 166 | Lewisburg (PCH). |
| 167 | endef |
| 168 | |
| 169 | $(eval $(call KernelPackage,i2c-i801)) |
| 170 | |
| 171 | |
| 172 | I2C_MUX_MODULES:= \ |
| 173 | CONFIG_I2C_MUX:drivers/i2c/i2c-mux |
| 174 | |
| 175 | define KernelPackage/i2c-mux |
| 176 | $(call i2c_defaults,$(I2C_MUX_MODULES),51) |
| 177 | TITLE:=I2C bus multiplexing support |
| 178 | DEPENDS:=+kmod-i2c-core |
| 179 | endef |
| 180 | |
| 181 | define KernelPackage/i2c-mux/description |
| 182 | Kernel modules for I2C bus multiplexing support |
| 183 | endef |
| 184 | |
| 185 | $(eval $(call KernelPackage,i2c-mux)) |
| 186 | |
| 187 | I2C_MUX_GPIO_MODULES:= \ |
| 188 | CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio |
| 189 | |
| 190 | define KernelPackage/i2c-mux-gpio |
| 191 | $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51) |
| 192 | TITLE:=GPIO-based I2C mux/switches |
| 193 | DEPENDS:=+kmod-i2c-mux |
| 194 | endef |
| 195 | |
| 196 | define KernelPackage/i2c-mux-gpio/description |
| 197 | Kernel modules for GENERIC_GPIO I2C bus mux/switching devices |
| 198 | endef |
| 199 | |
| 200 | $(eval $(call KernelPackage,i2c-mux-gpio)) |
| 201 | |
| 202 | |
| 203 | I2C_MUX_REG_MODULES:= \ |
| 204 | CONFIG_I2C_MUX_REG:drivers/i2c/muxes/i2c-mux-reg |
| 205 | |
| 206 | define KernelPackage/i2c-mux-reg |
| 207 | $(call i2c_defaults,$(I2C_MUX_REG_MODULES),51) |
| 208 | TITLE:=Register-based I2C mux/switches |
| 209 | DEPENDS:=+kmod-i2c-mux |
| 210 | endef |
| 211 | |
| 212 | define KernelPackage/i2c-mux-reg/description |
| 213 | Kernel modules for register-based I2C bus mux/switching devices |
| 214 | endef |
| 215 | |
| 216 | $(eval $(call KernelPackage,i2c-mux-reg)) |
| 217 | |
| 218 | |
| 219 | I2C_MUX_PCA9541_MODULES:= \ |
| 220 | CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541 |
| 221 | |
| 222 | define KernelPackage/i2c-mux-pca9541 |
| 223 | $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51) |
| 224 | TITLE:=Philips PCA9541 I2C mux/switches |
| 225 | DEPENDS:=+kmod-i2c-mux |
| 226 | endef |
| 227 | |
| 228 | define KernelPackage/i2c-mux-pca9541/description |
| 229 | Kernel modules for PCA9541 I2C bus mux/switching devices |
| 230 | endef |
| 231 | |
| 232 | $(eval $(call KernelPackage,i2c-mux-pca9541)) |
| 233 | |
| 234 | I2C_MUX_PCA954x_MODULES:= \ |
| 235 | CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x |
| 236 | |
| 237 | define KernelPackage/i2c-mux-pca954x |
| 238 | $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51) |
| 239 | TITLE:=Philips PCA954x I2C mux/switches |
| 240 | DEPENDS:=+kmod-i2c-mux |
| 241 | endef |
| 242 | |
| 243 | define KernelPackage/i2c-mux-pca954x/description |
| 244 | Kernel modules for PCA954x I2C bus mux/switching devices |
| 245 | endef |
| 246 | |
| 247 | $(eval $(call KernelPackage,i2c-mux-pca954x)) |
| 248 | |
| 249 | |
| 250 | I2C_PIIX4_MODULES:= \ |
| 251 | CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4 |
| 252 | |
| 253 | define KernelPackage/i2c-piix4 |
| 254 | $(call i2c_defaults,$(I2C_PIIX4_MODULES),59) |
| 255 | TITLE:=Intel PIIX4 and compatible I2C interfaces |
| 256 | DEPENDS:=@PCI_SUPPORT @TARGET_x86 +kmod-i2c-core |
| 257 | endef |
| 258 | |
| 259 | define KernelPackage/i2c-piix4/description |
| 260 | Support for the Intel PIIX4 family of mainboard I2C interfaces, |
| 261 | specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300, |
| 262 | ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2, |
| 263 | AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5, |
| 264 | Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and |
| 265 | SMSC Victory66. |
| 266 | endef |
| 267 | |
| 268 | $(eval $(call KernelPackage,i2c-piix4)) |
| 269 | |
| 270 | |
| 271 | I2C_PXA_MODULES:= \ |
| 272 | CONFIG_I2C_PXA:drivers/i2c/busses/i2c-pxa |
| 273 | |
| 274 | define KernelPackage/i2c-pxa |
| 275 | $(call i2c_defaults,$(I2C_PXA_MODULES),50) |
| 276 | TITLE:=Intel PXA I2C bus driver |
| 277 | DEPENDS:=+kmod-i2c-core |
| 278 | endef |
| 279 | |
| 280 | define KernelPackage/i2c-pxa/description |
| 281 | Kernel module for Intel PXA2XX I2C adapter |
| 282 | endef |
| 283 | |
| 284 | $(eval $(call KernelPackage,i2c-pxa)) |
| 285 | |
| 286 | |
| 287 | I2C_SMBUS_MODULES:= \ |
| 288 | CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus |
| 289 | |
| 290 | define KernelPackage/i2c-smbus |
| 291 | $(call i2c_defaults,$(I2C_SMBUS_MODULES),58) |
| 292 | TITLE:=SMBus-specific protocols helper |
| 293 | DEPENDS:=+kmod-i2c-core |
| 294 | endef |
| 295 | |
| 296 | define KernelPackage/i2c-smbus/description |
| 297 | Support for the SMBus extensions to the I2C specification. |
| 298 | endef |
| 299 | |
| 300 | $(eval $(call KernelPackage,i2c-smbus)) |
| 301 | |
| 302 | |
| 303 | |
| 304 | I2C_TINY_USB_MODULES:= \ |
| 305 | CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb |
| 306 | |
| 307 | define KernelPackage/i2c-tiny-usb |
| 308 | $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59) |
| 309 | TITLE:=I2C Tiny USB adaptor |
| 310 | DEPENDS:=@USB_SUPPORT +kmod-i2c-core +kmod-usb-core |
| 311 | endef |
| 312 | |
| 313 | define KernelPackage/i2c-tiny-usb/description |
| 314 | Kernel module for the I2C Tiny USB adaptor developed |
| 315 | by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb) |
| 316 | endef |
| 317 | |
| 318 | $(eval $(call KernelPackage,i2c-tiny-usb)) |
| 319 | |
| 320 | |