OpenCloudOS-Kernel/drivers/iio/common/hid-sensors
Song Hongyan 6f77199e9e iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation.
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>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-05 17:50:56 +00:00
..
Kconfig iio: hid-sensors: Fix power and report state 2013-12-02 21:05:32 +00:00
Makefile iio: hid-sensors: respect CONFIG_IIO_TRIGGER 2012-12-27 10:59:50 +00:00
hid-sensor-attributes.c iio: hid-sensors: Increase the precision of scale to fix wrong reading interpretation. 2016-11-05 17:50:56 +00:00
hid-sensor-trigger.c iio: hid-sensors: avoid unused function warning 2016-08-29 19:54:08 +01:00
hid-sensor-trigger.h iio: hid_sensor_hub: Common PM functions 2015-01-25 22:55:39 +00:00