Files
linux/drivers
Narcisa Ana Maria Vasile 0db5de4f4e iio: chemical: ccs811: Fix output of IIO_CONCENTRATION channels
commit 8f114acd4e upstream.

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>
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-02-03 17:39:23 +01:00
..
2017-12-14 09:53:13 +01:00
2018-01-17 09:45:27 +01:00
2018-02-03 17:39:00 +01:00
2018-02-03 17:39:17 +01:00
2018-02-03 17:39:17 +01:00
2017-12-29 17:53:46 +01:00
2018-01-17 09:45:27 +01:00
2018-01-02 20:31:05 +01:00
2017-12-17 15:07:56 +01:00