i2c.mk 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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_MPC_MODULES:=\
  79. CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc
  80. define KernelPackage/i2c-mpc
  81. $(call i2c_defaults,$(I2C_MPC_MODULES),59)
  82. TITLE:=MPC I2C accessors
  83. DEPENDS:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx +kmod-i2c-core
  84. endef
  85. define KernelPackage/i2c-mpc/description
  86. Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors
  87. endef
  88. $(eval $(call KernelPackage,i2c-mpc))
  89. I2C_IBM_IIC_MODULES:=\
  90. CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic
  91. define KernelPackage/i2c-ibm-iic
  92. $(call i2c_defaults,$(OF_I2C_MODULES),59)
  93. TITLE:=IBM PPC 4xx on-chip I2C interface support
  94. DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx +kmod-i2c-core
  95. endef
  96. define KernelPackage/i2c-ibm-iic/description
  97. Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems
  98. endef
  99. $(eval $(call KernelPackage,i2c-ibm-iic))
  100. I2C_MV64XXX_MODULES:=\
  101. CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx
  102. define KernelPackage/i2c-mv64xxx
  103. $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59)
  104. TITLE:=Orion Platform I2C interface support
  105. DEPENDS:=@TARGET_kirkwood||TARGET_orion +kmod-i2c-core
  106. endef
  107. define KernelPackage/i2c-mv64xxx/description
  108. Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
  109. family processors
  110. endef
  111. $(eval $(call KernelPackage,i2c-mv64xxx))
  112. I2C_TINY_USB_MODULES:= \
  113. CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
  114. define KernelPackage/i2c-tiny-usb
  115. $(call i2c_defaults,$(I2C_TINY_USB_MODULES),59)
  116. TITLE:=I2C Tiny USB adaptor
  117. DEPENDS:=@USB_SUPPORT kmod-i2c-core +kmod-usb-core
  118. endef
  119. define KernelPackage/i2c-tiny-usb/description
  120. Kernel module for the I2C Tiny USB adaptor developed
  121. by Till Harbaum (http://www.harbaum.org/till/i2c_tiny_usb)
  122. endef
  123. $(eval $(call KernelPackage,i2c-tiny-usb))
  124. I2C_PIIX4_MODULES:= \
  125. CONFIG_I2C_PIIX4:drivers/i2c/busses/i2c-piix4
  126. define KernelPackage/i2c-piix4
  127. $(call i2c_defaults,$(I2C_PIIX4_MODULES),59)
  128. TITLE:=Intel PIIX4 and compatible I2C interfaces
  129. DEPENDS:=@PCI_SUPPORT @(x86||x86_64) kmod-i2c-core
  130. endef
  131. define KernelPackage/i2c-piix4/description
  132. Support for the Intel PIIX4 family of mainboard I2C interfaces,
  133. specifically Intel PIIX4, Intel 440MX, ATI IXP200, ATI IXP300,
  134. ATI IXP400, ATI SB600, ATI SB700/SP5100, ATI SB800, AMD Hudson-2,
  135. AMD ML, AMD CZ, Serverworks OSB4, Serverworks CSB5,
  136. Serverworks CSB6, Serverworks HT-1000, Serverworks HT-1100 and
  137. SMSC Victory66.
  138. endef
  139. $(eval $(call KernelPackage,i2c-piix4))
  140. I2C_MUX_MODULES:= \
  141. CONFIG_I2C_MUX:drivers/i2c/i2c-mux
  142. define KernelPackage/i2c-mux
  143. $(call i2c_defaults,$(I2C_MUX_MODULES),51)
  144. TITLE:=I2C bus multiplexing support
  145. DEPENDS:=kmod-i2c-core
  146. endef
  147. define KernelPackage/i2c-mux/description
  148. Kernel modules for I2C bus multiplexing support
  149. endef
  150. $(eval $(call KernelPackage,i2c-mux))
  151. I2C_MUX_GPIO_MODULES:= \
  152. CONFIG_I2C_MUX_GPIO:drivers/i2c/muxes/i2c-mux-gpio
  153. define KernelPackage/i2c-mux-gpio
  154. $(call i2c_defaults,$(I2C_MUX_GPIO_MODULES),51)
  155. TITLE:=GPIO-based I2C mux/switches
  156. DEPENDS:=kmod-i2c-mux
  157. endef
  158. define KernelPackage/i2c-mux-gpio/description
  159. Kernel modules for GENERIC_GPIO I2C bus mux/switching devices
  160. endef
  161. $(eval $(call KernelPackage,i2c-mux-gpio))
  162. I2C_MUX_PCA954x_MODULES:= \
  163. CONFIG_I2C_MUX_PCA954x:drivers/i2c/muxes/i2c-mux-pca954x
  164. define KernelPackage/i2c-mux-pca954x
  165. $(call i2c_defaults,$(I2C_MUX_PCA954x_MODULES),51)
  166. TITLE:=Philips PCA954x I2C mux/switches
  167. DEPENDS:=kmod-i2c-mux
  168. endef
  169. define KernelPackage/i2c-mux-pca954x/description
  170. Kernel modules for PCA954x I2C bus mux/switching devices
  171. endef
  172. $(eval $(call KernelPackage,i2c-mux-pca954x))
  173. I2C_MUX_PCA9541_MODULES:= \
  174. CONFIG_I2C_MUX_PCA9541:drivers/i2c/muxes/i2c-mux-pca9541
  175. define KernelPackage/i2c-mux-pca9541
  176. $(call i2c_defaults,$(I2C_MUX_PCA9541_MODULES),51)
  177. TITLE:=Philips PCA9541 I2C mux/switches
  178. DEPENDS:=kmod-i2c-mux
  179. endef
  180. define KernelPackage/i2c-mux-pca9541/description
  181. Kernel modules for PCA9541 I2C bus mux/switching devices
  182. endef
  183. $(eval $(call KernelPackage,i2c-mux-pca9541))