1
linux/Documentation/ABI/testing/sysfs-bus-iio-chemical-sgp40
Andreas Klinger 1081b9d971 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>
2021-08-08 15:19:18 +01:00

32 lines
969 B
Plaintext

What: /sys/bus/iio/devices/iio:deviceX/out_temp_raw
Date: August 2021
KernelVersion: 5.15
Contact: Andreas Klinger <ak@it-klinger.de>
Description:
Set the temperature. This value is sent to the sensor for
temperature compensation.
Default value: 25000 (25 °C)
What: /sys/bus/iio/devices/iio:deviceX/out_humidityrelative_raw
Date: August 2021
KernelVersion: 5.15
Contact: Andreas Klinger <ak@it-klinger.de>
Description:
Set the relative humidity. This value is sent to the sensor for
humidity compensation.
Default value: 50000 (50 % relative humidity)
What: /sys/bus/iio/devices/iio:deviceX/in_resistance_calibbias
Date: August 2021
KernelVersion: 5.15
Contact: Andreas Klinger <ak@it-klinger.de>
Description:
Set the bias value for the resistance which is used for
calculation of in_concentration_input as follows:
x = (in_resistance_raw - in_resistance_calibbias) * 0.65
in_concentration_input = 500 / (1 + e^x)
Default value: 30000