aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorbjörn Jansson <torbjorn.jansson@mbox200.swipnet.se>2018-07-30 15:59:20 +0200
committerJohn Crispin <john@phrozen.org>2018-07-30 19:34:43 +0200
commitaf9a96d23eda3c9989e8b80c9ad2a9c41334aefd (patch)
tree99f62286b6b4ca56b9ce8e416c658315ecd51ee4
parent20346a63f69bbb919ffdf29bc2e77496d01719e3 (diff)
downloadupstream-af9a96d23eda3c9989e8b80c9ad2a9c41334aefd.tar.gz
upstream-af9a96d23eda3c9989e8b80c9ad2a9c41334aefd.tar.bz2
upstream-af9a96d23eda3c9989e8b80c9ad2a9c41334aefd.zip
kernel: add kmod-iio-htu21
This adds support for the htu21 humidity and temperature sensor. To get it to work you have to do something like this: echo "htu21 0x40" >/sys/class/i2c-dev/i2c-1/device/new_device for example by adding it to rc.local Compile tested on brcm2708 and I have used an earlier version of this patch for more than a year. Signed-off-by: Torbjörn Jansson <torbjorn.jansson@mbox200.swipnet.se>
-rw-r--r--package/kernel/linux/modules/iio.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk
index c35ccca1bb..a1410170db 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -133,3 +133,25 @@ define KernelPackage/iio-bmp280-spi/description
endef
$(eval $(call KernelPackage,iio-bmp280-spi))
+
+define KernelPackage/iio-htu21
+ SUBMENU:=$(IIO_MENU)
+ DEPENDS:=+kmod-i2c-core +kmod-iio-core
+ TITLE:=HTU21 humidity & temperature sensor
+ KCONFIG:= \
+ CONFIG_HTU21 \
+ CONFIG_IIO_MS_SENSORS_I2C
+ FILES:= \
+ $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
+ $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
+ AUTOLOAD:=$(call AutoLoad,56,htu21)
+endef
+
+define KernelPackage/iio-htu21/description
+ support for the Measurement Specialties HTU21 humidity and
+ temperature sensor.
+ This driver is also used for MS8607 temperature, pressure & humidity
+ sensor
+endef
+
+$(eval $(call KernelPackage,iio-htu21))