linux/drivers/iio/pressure
Gregor Boirie f9660d5d7c iio:st_pressure: fix sampling gains (bring inline with ABI)
commit d43a41152f upstream.

Temperature channels report scaled samples in Celsius although expected as
milli degree Celsius in Documentation/ABI/testing/sysfs-bus-iio.
Gains are not implemented at all for LPS001WP pressure and temperature
channels.

This patch ensures that proper offsets and scales are exposed to userpace
for both pressure and temperature channels.
Also fix a NULL pointer exception when userspace reads content of sysfs
scale attribute when gains are not defined.

Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[bwh: Backported to 3.16:
 - Adjust context
 - In st_press_read_raw() use pdata instead of press_data]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-08-22 22:38:11 +01:00
..
hid-sensor-press.c iio: pressure: hid-sensor-press: Fix modifier 2015-05-28 09:59:57 +01:00
Kconfig iio: Add Freescale MPL115A2 pressure / temperature sensor driver 2014-05-03 11:31:36 +01:00
Makefile iio: Add Freescale MPL115A2 pressure / temperature sensor driver 2014-05-03 11:31:36 +01:00
mpl115.c iio: pressure: mpl115: fix temperature offset sign 2016-02-25 00:18:39 +00:00
mpl3115.c iio: Fix two mpl3115 issues in measurement conversion 2014-05-29 17:38:36 +01:00
st_pressure.h iio:pressure: Add support for LPS25H pressure sensor 2014-02-22 13:09:53 +00:00
st_pressure_buffer.c iio:st_pressure: Remove redundant call to iio_sw_buffer_preenable(). 2013-10-16 19:13:56 +01:00
st_pressure_core.c iio:st_pressure: fix sampling gains (bring inline with ABI) 2016-08-22 22:38:11 +01:00
st_pressure_i2c.c iio:pressure: Add support for LPS25H pressure sensor 2014-02-22 13:09:53 +00:00
st_pressure_spi.c iio:pressure: Add support for LPS25H pressure sensor 2014-02-22 13:09:53 +00:00