1
0

w1.mk 4.7 KB

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