iio: hid-sensor-attributes: Fix gravity sensor scale value not right issue
authorSong Hongyan <hongyan.song@intel.com>
Mon, 20 Mar 2017 09:12:54 +0000 (17:12 +0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 25 Mar 2017 16:25:11 +0000 (16:25 +0000)
commite0ad9b73e81a2dfb8cf8b375fefbb0891a8187a1
tree5b1a8d49f760bd3c7854189cd025c38847e49769
parent5e7f47e495ad3657e1a7264bf20fb363607161e6
iio: hid-sensor-attributes: Fix gravity sensor scale value not right issue

Scale value include two parts: unit conversion and exponent conversion.
Add gravity unit convert table to fix gravity sensor scale value not
right issue.

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>
drivers/iio/common/hid-sensors/hid-sensor-attributes.c