iio: chemical: Add driver support for sgp40
authorAndreas Klinger <ak@it-klinger.de>
Wed, 4 Aug 2021 15:46:42 +0000 (17:46 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Aug 2021 14:19:18 +0000 (15:19 +0100)
commit1081b9d97152e6aa28a1868ec8e0587b2b8fb2ae
tree43181741dd557845ea60bf7c49d89047ec4b26f2
parent3722c105ecd1129bba593a9599b8c513c0129536
iio: chemical: Add driver support for sgp40

sgp40 is a gas sensor used for measuring the air quality.

This driver is reading the raw resistance value which can be passed to
an userspace algorithm for further calculation.

The raw value is also used to calculate an estimated absolute voc index
in the range from 0 to 500. For this purpose the raw_mean value of the
resistance for which the index value is 250 might be set up as a
calibration step. This can be done with in_resistance_calibbias.

Compensation of relative humidity and temperature is supported and can
be used by writing to output values of out_humidityrelative_raw and
out_temp_raw.

There is a predecesor sensor type (sgp30) already existing. This driver
module was not extended because the new sensor is quite different in its
i2c telegrams.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20210804154641.GA3237@arbad
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-iio-chemical-sgp40 [new file with mode: 0644]
MAINTAINERS
drivers/iio/chemical/Kconfig
drivers/iio/chemical/Makefile
drivers/iio/chemical/sgp40.c [new file with mode: 0644]