Add support for DHT11 driver
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 29 Oct 2014 15:02:38 +0000 (15:02 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 29 Oct 2014 15:02:38 +0000 (15:02 +0000)
The DHT11 is a temperature and humidity sensor supported by linux
since 3.14.

This patch is tested on recent mxs with kernel 3.14.18.

Signed-off-by: Harald Geyer <harald@ccbib.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43103 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/kernel/linux/modules/other.mk

index 58aae3c..c514fd7 100644 (file)
@@ -258,6 +258,26 @@ endef
 
 $(eval $(call KernelPackage,iio-ad799x))
 
+
+define KernelPackage/iio-dht11
+  SUBMENU:=$(OTHER_MENU)
+  DEPENDS:=kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE
+  TITLE:=DHT11 (and compatible) humidity and temperature sensors
+  KCONFIG:= \
+       CONFIG_DHT11
+  FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko
+  AUTOLOAD:=$(call AutoLoad,56,dht11)
+endef
+
+define KernelPackage/iio-dht11/description
+ support for DHT11 and DHT22 digitial humidity and temperature sensors
+ attached at GPIO lines. You will need a custom device tree file to
+ specify the GPIO line to use.
+endef
+
+$(eval $(call KernelPackage,iio-dht11))
+
+
 define KernelPackage/lp
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Parallel port and line printer support