linux/drivers/iio
Song Hongyan 274b874d00 iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation.
commit 6f77199e9e upstream.

While testing, it was observed that on some platforms the scale value
from iio sysfs for gyroscope is always 0 (E.g. Yoga 260). This results
in the final angular velocity component values to be zeros.

This is caused by insufficient precision of scale value displayed in sysfs.
If the precision is changed to nano from current micro, then this is
sufficient to display the scale value on this platform.
Since this can be a problem for all other HID sensors, increase scale
precision of all HID sensors to nano from current micro.

Results on Yoga 260:

name		scale before	scale now
--------------------------------------------
gyro_3d		0.000000	0.000000174
als			0.001000	0.001000000
magn_3d		0.000001	0.000001000
accel_3d		0.000009	0.000009806

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-02-23 03:54:29 +00:00
..
accel iio: accel: kxsd9: Fix scaling bug 2016-11-20 01:17:22 +00:00
adc iio: adc: ti_am335x_adc: Protect FIFO1 from concurrent access 2016-11-20 01:17:15 +00:00
amplifiers iio: amplifiers: ad8366: Remove regulator_put 2013-09-28 11:49:45 +01:00
common iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation. 2017-02-23 03:54:29 +00:00
dac iio: dac: mcp4725: set iio name property in sysfs 2016-02-25 00:18:34 +00:00
frequency Merge 3.12-rc6 into staging-next. 2013-10-19 13:14:34 -07:00
gyro iio:st_sensors: Fix oops when probing SPI devices 2015-05-28 09:59:58 +01:00
humidity iio: Add si7005 relative humidity and temperature sensor driver 2014-01-11 11:12:44 +00:00
imu iio: adis_buffer: Fix out-of-bounds memory access 2016-02-16 19:50:01 +00:00
light iio: light: hid-sensor-prox: Fix modifier 2015-05-28 09:59:56 +01:00
magnetometer iio: ak8975: Fix NULL pointer exception on early interrupt 2016-06-15 21:29:24 +01:00
orientation iio: hid-sensors: Inclinometer 3D: Raw read support 2014-05-05 10:59:52 +01:00
pressure iio:st_pressure: fix sampling gains (bring inline with ABI) 2016-08-22 22:38:11 +01:00
proximity iio: proximity: as3935: set up buffer timestamps for non-zero values 2016-11-20 01:17:11 +00:00
temperature iio: tmp006: Check channel info on write 2015-08-10 09:54:08 +01:00
trigger iio:trigger: fix sysfs name on list mutex 2013-09-28 11:51:16 +01:00
buffer_cb.c iio get rid of unneccessary error_ret 2014-02-18 08:46:36 +00:00
iio_core.h IIO: core: Introduce read_raw_multi 2014-04-29 22:05:32 +01:00
iio_core_trigger.h iio: fix semicolon in io_core_trigger.h 2013-08-03 18:40:32 +01:00
industrialio-buffer.c iio: fix some warning messages 2016-01-11 10:50:15 +00:00
industrialio-core.c iio:core: fix IIO_VAL_FRACTIONAL sign handling 2016-11-20 01:17:23 +00:00
industrialio-event.c iio: event: Remove negative error code from iio_event_poll 2015-09-28 10:21:38 +01:00
industrialio-trigger.c iio: Fix error handling in iio_trigger_attach_poll_func 2016-08-22 22:38:13 +01:00
industrialio-triggered-buffer.c iio:triggered-buffer: Remove redundant call to iio_sw_buffer_preenable(). 2013-10-16 19:12:47 +01:00
inkern.c iio: inkern: fix a NULL dereference on error 2016-02-25 00:18:38 +00:00
Kconfig iio: always select ANON_INODES 2014-05-10 11:39:57 +01:00
kfifo_buf.c iio: kfifo_buf: Implement data_available() callback 2013-12-03 20:22:28 +00:00
Makefile iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00