android_kernel_lge_bullhead/drivers/iio/accel
Linus Walleij 4813b8bd3e iio: accel: kxsd9: Fix scaling bug
commit 307fe9dd11ae44d4f8881ee449a7cbac36e1f5de 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: Willy Tarreau <w@1wt.eu>
2017-02-10 11:03:35 +01:00
..
Kconfig iio:accel: Add STMicroelectronics accelerometers driver 2013-01-31 17:56:43 +00:00
Makefile iio:accel: Add STMicroelectronics accelerometers driver 2013-01-31 17:56:43 +00:00
hid-sensor-accel-3d.c iio:hid_sensors move to info_mask_(shared_by_type/separate) 2013-03-17 19:49:18 +00:00
kxsd9.c iio: accel: kxsd9: Fix scaling bug 2017-02-10 11:03:35 +01:00
st_accel.h iio:accel: Add STMicroelectronics accelerometers driver 2013-01-31 17:56:43 +00:00
st_accel_buffer.c iio:trigger: Introduce iio_tigger_{set,get}_drvdata 2013-03-25 21:06:09 +00:00
st_accel_core.c iio:st_sensors fix build when !CONFIG_IIO_TRIGGER 2013-02-09 15:22:29 +00:00
st_accel_i2c.c iio:st_sensors fix build when !CONFIG_IIO_TRIGGER 2013-02-09 15:22:29 +00:00
st_accel_spi.c iio:st_sensors fix build when !CONFIG_IIO_TRIGGER 2013-02-09 15:22:29 +00:00