Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 091a121b authored by Harald Geyer's avatar Harald Geyer Committed by Jonathan Cameron
Browse files

iio: Add new driver dht11



This driver handles DHT11 and DHT22 sensors.

Signed-off-by: default avatarHarald Geyer <harald@ccbib.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ac216aa2
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
* DHT11 humidity/temperature sensor (and compatibles like DHT22)

Required properties:
  - compatible: Should be "dht11"
  - gpios: Should specify the GPIO connected to the sensor's data
    line, see "gpios property" in
    Documentation/devicetree/bindings/gpio/gpio.txt.

Example:

humidity_sensor {
	compatible = "dht11";
	gpios = <&gpio0 6 0>;
}
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ source "drivers/iio/common/Kconfig"
source "drivers/iio/dac/Kconfig"
source "drivers/iio/frequency/Kconfig"
source "drivers/iio/gyro/Kconfig"
source "drivers/iio/humidity/Kconfig"
source "drivers/iio/imu/Kconfig"
source "drivers/iio/light/Kconfig"
source "drivers/iio/magnetometer/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ obj-y += common/
obj-y += dac/
obj-y += gyro/
obj-y += frequency/
obj-y += humidity/
obj-y += imu/
obj-y += light/
obj-y += magnetometer/
+15 −0
Original line number Diff line number Diff line
#
# humidity sensor drivers
#
menu "Humidity sensors"

config DHT11
	tristate "DHT11 (and compatible sensors) driver"
	depends on GPIOLIB
	help
	  This driver supports reading data via a single interrupt
	  generating GPIO line. Currently tested are DHT11 and DHT22.
	  Other sensors should work as well as long as they speak the
	  same protocol.

endmenu
+5 −0
Original line number Diff line number Diff line
#
# Makefile for IIO humidity sensor drivers
#

obj-$(CONFIG_DHT11) += dht11.o
Loading