linux/drivers/iio/accel
Linus Walleij 3481ab8a20 iio: accel: kxsd9: Fix scaling bug
commit 307fe9dd11 upstream.

All the scaling of the KXSD9 involves multiplication with a
fraction number < 1.

However the scaling value returned from IIO_INFO_SCALE was
unpredictable as only the micros of the value was assigned, and
not the integer part, resulting in scaling like this:

$cat in_accel_scale
-1057462640.011978

Fix this by assigning zero to the integer part.

Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-11-20 01:17:22 +00:00
..
bma180.c iio: fix drivers that check buffer->scan_mask 2015-04-13 16:48:55 +01:00
hid-sensor-accel-3d.c iio: hid-sensor-accel-3d: Fix return values 2014-07-05 11:04:48 +01:00
Kconfig iio: Add Freescale MMA8452Q 3-axis accelerometer driver 2014-05-03 12:06:25 +01:00
kxsd9.c iio: accel: kxsd9: Fix scaling bug 2016-11-20 01:17:22 +00:00
Makefile iio: Add Freescale MMA8452Q 3-axis accelerometer driver 2014-05-03 12:06:25 +01:00
mma8452.c iio: mma8452: Use correct acceleration units. 2014-07-12 13:18:55 +01:00
st_accel.h iio: Added ST-sensors platform data to select the DRDY interrupt pin 2013-08-03 18:40:28 +01:00
st_accel_buffer.c iio:st_accel: Drop redundant call to iio_sw_buffer_preenable() 2013-10-16 19:11:11 +01:00
st_accel_core.c iio:st_sensors: Fix oops when probing SPI devices 2015-05-28 09:59:58 +01:00
st_accel_i2c.c iio: accel: st_accel: Use devm_iio_device_alloc 2013-08-03 18:41:18 +01:00
st_accel_spi.c iio: accel: st_accel: Use devm_iio_device_alloc 2013-08-03 18:41:18 +01:00