i2c.mk 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. I2C_MENU:=I2C support
  8. ModuleConfVar=$(word 1,$(subst :,$(space),$(1)))
  9. ModuleFullPath=$(LINUX_DIR)/$(word 2,$(subst :,$(space),$(1))).ko
  10. ModuleKconfig=$(foreach mod,$(1),$(call ModuleConfVar,$(mod)))
  11. ModuleFiles=$(foreach mod,$(1),$(call ModuleFullPath,$(mod)))
  12. ModuleAuto=$(call AutoLoad,$(1),$(foreach mod,$(2),$(basename $(notdir $(call ModuleFullPath,$(mod))))),$(3))
  13. define i2c_defaults
  14. SUBMENU:=$(I2C_MENU)
  15. KCONFIG:=$(call ModuleKconfig,$(1))
  16. FILES:=$(call ModuleFiles,$(1))
  17. AUTOLOAD:=$(call ModuleAuto,$(2),$(1),$(3))
  18. endef
  19. I2C_CORE_MODULES:= \
  20. CONFIG_I2C:drivers/i2c/i2c-core \
  21. CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
  22. ifeq ($(CONFIG_OF),y)
  23. I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c@lt3.12
  24. endif
  25. define KernelPackage/i2c-core
  26. $(call i2c_defaults,$(I2C_CORE_MODULES),51)
  27. TITLE:=I2C support
  28. endef
  29. define KernelPackage/i2c-core/description
  30. Kernel modules for I2C support
  31. endef
  32. $(eval $(call KernelPackage,i2c-core))
  33. I2C_ALGOBIT_MODULES:= \
  34. CONFIG_I2C_ALGOBIT:drivers/i2c/algos/i2c-algo-bit
  35. define KernelPackage/i2c-algo-bit
  36. $(call i2c_defaults,$(I2C_ALGOBIT_MODULES),55)
  37. TITLE:=I2C bit-banging interfaces
  38. DEPENDS:=kmod-i2c-core
  39. endef
  40. define KernelPackage/i2c-algo-bit/description
  41. Kernel modules for I2C bit-banging interfaces
  42. endef
  43. $(eval $(call KernelPackage,i2c-algo-bit))
  44. I2C_ALGOPCA_MODULES:= \
  45. CONFIG_I2C_ALGOPCA:drivers/i2c/algos/i2c-algo-pca
  46. define KernelPackage/i2c-algo-pca
  47. $(call i2c_defaults,$(I2C_ALGOPCA_MODULES),55)
  48. TITLE:=I2C PCA 9564 interfaces
  49. DEPENDS:=kmod-i2c-core
  50. endef
  51. define KernelPackage/i2c-algo-pca/description
  52. Kernel modules for I2C PCA 9564 interfaces
  53. endef
  54. $(eval $(call KernelPackage,i2c-algo-pca))
  55. I2C_ALGOPCF_MODULES:= \
  56. CONFIG_I2C_ALGOPCF:drivers/i2c/algos/i2c-algo-pcf
  57. define KernelPackage/i2c-algo-pcf
  58. $(call i2c_defaults,$(I2C_ALGOPCF_MODULES),55)
  59. TITLE:=I2C PCF 8584 interfaces
  60. DEPENDS:=kmod-i2c-core
  61. endef
  62. define KernelPackage/i2c-algo-pcf/description
  63. Kernel modules for I2C PCF 8584 interfaces
  64. endef
  65. $(eval $(call KernelPackage,i2c-algo-pcf))
  66. I2C_GPIO_MODULES:= \
  67. CONFIG_I2C_GPIO:drivers/i2c/busses/i2c-gpio
  68. define KernelPackage/i2c-gpio
  69. $(call i2c_defaults,$(I2C_GPIO_MODULES),59)
  70. TITLE:=GPIO-based bitbanging I2C
  71. DEPENDS:=@GPIO_SUPPORT +kmod-i2c-algo-bit
  72. endef
  73. define KernelPackage/i2c-gpio/description
  74. Kernel modules for a very simple bitbanging I2C driver utilizing the
  75. arch-neutral GPIO API to control the SCL and SDA lines.
  76. endef
  77. $(eval $(call KernelPackage,i2c-gpio))
  78. I2C_TINY_USB_MODULES:= \
  79. CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
  80. define KernelPackage/i2c-tiny-usb
  81. $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
  82. TITLE:=I2C Tiny USB adaptor
  83. DEPENDS:=@USB_SUPPORT kmod-i2c-core +kmod-usb-core
  84. endef
  85. define KernelPackage/i2c-tiny-usb/description
  86. Kernel module for the I2C Tiny USB adaptor developed
  87. by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
  88. endef
  89. $(eval $(call KernelPackage,i2c-tiny-usb))
  90. I2C_PIIX4_MODULES:= \
  91. CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
  92. define KernelPackage/i2c-piix4
  93. $(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
  94. TITLE:=Intel PIIX4 and compatible I2C interfaces
  95. DEPENDS:=@PCI_SUPPORT @(x86||x86_64) kmod-i2c-core
  96. endef
  97. define KernelPackage/i2c-piix4/description
  98. Support for the Intel PIIX4 family of mainboard I2C interfaces,
  99. specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
  100. ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
  101. AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
  102. Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
  103. SMSC Victory66.
  104. endef
  105. $(eval $(call KernelPackage,i2c-piix4))
  106. I2C_MUX_MODULES:= \
  107. CONFIG_I2C_MUX:drivers/i2c/i2c-mux
  108. define KernelPackage/i2c-mux
  109. $(call i2c_defaults,$(I2C_MUX_MODULES),51)
  110. TITLE:=I2C bus multiplexing support
  111. DEPENDS:=kmod-i2c-core
  112. endef
  113. define KernelPackage/i2c-mux/description
  114. Kernel modules for I2C bus multiplexing support
  115. endef
  116. $(eval $(call KernelPackage,i2c-mux))
  117. I2C_MUX_GPIO_MODULES:= \
  118. CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
  119. define KernelPackage/i2c-mux-gpio
  120. $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
  121. TITLE:=GPIO-based I2C mux/switches
  122. DEPENDS:=kmod-i2c-mux
  123. endef
  124. define KernelPackage/i2c-mux-gpio/description
  125. Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
  126. endef
  127. $(eval $(call KernelPackage,i2c-mux-gpio))
  128. I2C_MUX_PCA954x_MODULES:= \
  129. CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
  130. define KernelPackage/i2c-mux-pca954x
  131. $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
  132. TITLE:=Philips PCA954x I2C mux/switches
  133. DEPENDS:=kmod-i2c-mux
  134. endef
  135. define KernelPackage/i2c-mux-pca954x/description
  136. Kernel modules for PCA954x I2C bus mux/switching devices
  137. endef
  138. $(eval $(call KernelPackage,i2c-mux-pca954x))
  139. I2C_MUX_PCA9541_MODULES:= \
  140. CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
  141. define KernelPackage/i2c-mux-pca9541
  142. $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
  143. TITLE:=Philips PCA9541 I2C mux/switches
  144. DEPENDS:=kmod-i2c-mux
  145. endef
  146. define KernelPackage/i2c-mux-pca9541/description
  147. Kernel modules for PCA9541 I2C bus mux/switching devices
  148. endef
  149. $(eval $(call KernelPackage,i2c-mux-pca9541))