iio: dht11: Improve detection of sensor type
authorHarald Geyer <harald@ccbib.org>
Sun, 11 Feb 2018 11:09:40 +0000 (11:09 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2018 12:03:16 +0000 (12:03 +0000)
commita6bffb6920d16fb2ef4ba072fac5b64b36b1c254
treec78fa9fce5d4f2c43082c5e40b6d3fb4946896e5
parent7fe2241c0ed6e6940924ed58fec8877f72e1279d
iio: dht11: Improve detection of sensor type

The old code was based on a DHT11 datasheet which specifies a measurement
range of 20%-90% RH. Turns out the sensor actually reports values outside
this range, so we should support it as far as possible.

Reported-by: Edward Attfield <edward@attfield.ca>
Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/humidity/dht11.c