w1.mk 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. #
  2. # Copyright (C) 2008-2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. W1_MENU:=W1 support
  8. W1_MASTERS_DIR:=$(LINUX_DIR)/drivers/w1/masters
  9. W1_SLAVES_DIR:=$(LINUX_DIR)/drivers/w1/slaves
  10. define KernelPackage/w1
  11. SUBMENU:=$(W1_MENU)
  12. TITLE:=Dallas's 1-wire support
  13. KCONFIG:=CONFIG_W1
  14. FILES:=$(LINUX_DIR)/drivers/w1/wire.ko
  15. endef
  16. define KernelPackage/w1/description
  17. Kernel module for Dallas's 1-wire support
  18. endef
  19. $(eval $(call KernelPackage,w1))
  20. define AddDepends/w1
  21. SUBMENU:=$(W1_MENU)
  22. DEPENDS+=kmod-w1 $(1)
  23. endef
  24. #
  25. # 1-wire masters
  26. #
  27. define KernelPackage/w1-master-gpio
  28. TITLE:=GPIO 1-wire bus master driver
  29. DEPENDS:=@GPIO_SUPPORT
  30. KCONFIG:=CONFIG_W1_MASTER_GPIO
  31. FILES:=$(W1_MASTERS_DIR)/w1-gpio.ko
  32. AUTOLOAD:=$(call AutoProbe,w1-gpio)
  33. $(call AddDepends/w1)
  34. endef
  35. define KernelPackage/w1-master-gpio/description
  36. Kernel module for the GPIO 1-wire bus master driver
  37. endef
  38. $(eval $(call KernelPackage,w1-master-gpio))
  39. define KernelPackage/w1-master-ds2482
  40. TITLE:=DS2482 1-wire i2c bus master driver
  41. KCONFIG:=CONFIG_W1_MASTER_DS2482
  42. FILES:=$(W1_MASTERS_DIR)/ds2482.ko
  43. AUTOLOAD:=$(call AutoProbe,ds2482)
  44. $(call AddDepends/w1,+kmod-i2c-core)
  45. endef
  46. define KernelPackage/w1-master-ds2482/description
  47. Kernel module for the DS2482 i2c 1-wire bus master driver
  48. NOTE: Init with: echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-0/new_device
  49. or use owfs
  50. endef
  51. $(eval $(call KernelPackage,w1-master-ds2482))
  52. define KernelPackage/w1-master-ds2490
  53. TITLE:=DS2490 1-wire usb bus master driver
  54. DEPENDS:=@USB_SUPPORT +kmod-usb-core
  55. KCONFIG:=CONFIG_W1_MASTER_DS2490
  56. FILES:=$(W1_MASTERS_DIR)/ds2490.ko
  57. AUTOLOAD:=$(call AutoProbe,ds2490)
  58. $(call AddDepends/w1)
  59. endef
  60. define KernelPackage/w1-master-ds2490/description
  61. Kernel module for the DS2490 usb 1-wire bus master driver
  62. endef
  63. $(eval $(call KernelPackage,w1-master-ds2490))
  64. define KernelPackage/w1-master-mxc
  65. TITLE:=Freescale MXC 1-wire busmaster
  66. DEPENDS:=@(TARGET_mxs||TARGET_imx6)
  67. KCONFIG:=CONFIG_W1_MASTER_MXC
  68. FILES:=$(W1_MASTERS_DIR)/mxc_w1.ko
  69. AUTOLOAD:=$(call AutoProbe,mxc_w1)
  70. $(call AddDepends/w1)
  71. endef
  72. define KernelPackage/w1-master-mxc/description
  73. Kernel module for 1-wire Freescale MXC 1-wire busmaster
  74. endef
  75. $(eval $(call KernelPackage,w1-master-mxc))
  76. #
  77. # 1-wire slaves
  78. #
  79. define KernelPackage/w1-slave-therm
  80. TITLE:=Thermal family implementation
  81. KCONFIG:=CONFIG_W1_SLAVE_THERM
  82. FILES:=$(W1_SLAVES_DIR)/w1_therm.ko
  83. AUTOLOAD:=$(call AutoProbe,w1_therm)
  84. $(call AddDepends/w1)
  85. endef
  86. define KernelPackage/w1-slave-therm/description
  87. Kernel module for 1-wire thermal sensors
  88. endef
  89. $(eval $(call KernelPackage,w1-slave-therm))
  90. define KernelPackage/w1-slave-smem
  91. TITLE:=Simple 64bit memory family implementation
  92. KCONFIG:=CONFIG_W1_SLAVE_SMEM
  93. FILES:=$(W1_SLAVES_DIR)/w1_smem.ko
  94. AUTOLOAD:=$(call AutoProbe,w1_smem)
  95. $(call AddDepends/w1)
  96. endef
  97. define KernelPackage/w1-slave-smem/description
  98. Kernel module for 1-wire simple 64bit memory rom(ds2401/ds2411/ds1990*)
  99. endef
  100. $(eval $(call KernelPackage,w1-slave-smem))
  101. define KernelPackage/w1-slave-ds2431
  102. TITLE:=DS2431 1kb EEPROM driver
  103. KCONFIG:= CONFIG_W1_SLAVE_DS2431
  104. FILES:=$(W1_SLAVES_DIR)/w1_ds2431.ko
  105. AUTOLOAD:=$(call AutoProbe,w1_ds2431)
  106. $(call AddDepends/w1)
  107. endef
  108. define KernelPackage/w1-slave-ds2431/description
  109. Kernel module for 1-wire 1kb EEPROM (DS2431)
  110. endef
  111. $(eval $(call KernelPackage,w1-slave-ds2431))
  112. define KernelPackage/w1-slave-ds2433
  113. TITLE:=DS2433 4kb EEPROM driver
  114. KCONFIG:= \
  115. CONFIG_W1_SLAVE_DS2433 \
  116. CONFIG_W1_SLAVE_DS2433_CRC=n
  117. FILES:=$(W1_SLAVES_DIR)/w1_ds2433.ko
  118. AUTOLOAD:=$(call AutoProbe,w1_ds2433)
  119. $(call AddDepends/w1)
  120. endef
  121. define KernelPackage/w1-slave-ds2433/description
  122. Kernel module for 1-wire 4kb EEPROM (DS2433)
  123. endef
  124. $(eval $(call KernelPackage,w1-slave-ds2433))
  125. define KernelPackage/w1-slave-ds2760
  126. TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others)
  127. KCONFIG:= \
  128. CONFIG_W1_SLAVE_DS2760 \
  129. CONFIG_W1_SLAVE_DS2433_CRC=n
  130. FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko
  131. AUTOLOAD:=$(call AutoProbe,w1_ds2760)
  132. $(call AddDepends/w1)
  133. endef
  134. define KernelPackage/w1-slave-ds2760/description
  135. Kernel module for 1-wire DS2760 battery monitor chip support
  136. endef
  137. $(eval $(call KernelPackage,w1-slave-ds2760))
  138. define KernelPackage/w1-slave-ds2413
  139. TITLE:=DS2413 2 Ch. Addressable Switch
  140. KCONFIG:= \
  141. CONFIG_W1_SLAVE_DS2413
  142. FILES:=$(W1_SLAVES_DIR)/w1_ds2413.ko
  143. AUTOLOAD:=$(call AutoProbe,w1_ds2413)
  144. $(call AddDepends/w1)
  145. endef
  146. define KernelPackage/w1-slave-ds2413/description
  147. Kernel module for 1-wire DS2413 Dual Channel Addressable Switch support
  148. endef
  149. $(eval $(call KernelPackage,w1-slave-ds2413))