linux/drivers/iio/chemical
Narcisa Ana Maria Vasile 8f114acd4e iio: chemical: ccs811: Fix output of IIO_CONCENTRATION channels
in_concentration_raw should report, according to sysfs-bus-iio documentation,
a "Raw (unscaled no offset etc.) percentage reading of a substance."

Modify scale to convert from ppm/ppb to percentage:
1 ppm = 0.0001%
1 ppb = 0.0000001%

There is no offset needed to convert the ppm/ppb to percentage,
so remove offset from IIO_CONCENTRATION (IIO_MOD_CO2) channel.

Cc'd stable to reduce chance of userspace breakage in the long
run as we fix this wrong bit of ABI usage.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Cc: <Stable@vger.kernel.org>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:03:44 +01:00
..
Kconfig iio: chemical: ccs811: Add triggered buffer support 2017-08-18 08:08:02 +01:00
Makefile iio: chemical: ccs811: Add support for AMS CCS811 VOC sensor 2017-07-22 21:16:37 +01:00
ams-iaq-core.c iio:chemical: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:25:20 +01:00
atlas-ph-sensor.c iio:chemical: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:25:20 +01:00
ccs811.c iio: chemical: ccs811: Fix output of IIO_CONCENTRATION channels 2018-01-08 16:03:44 +01:00
vz89x.c iio:chemical: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:25:20 +01:00