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