]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hid-sensors: Convert units and exponent
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 18 Apr 2014 23:22:00 +0000 (00:22 +0100)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 May 2014 09:59:44 +0000 (10:59 +0100)
commit6db4c2ed26828014b1765725d99ba22e6ce11869
tree3601d52baa45ff006e6bf7b2d13436c8046fa71e
parentea86b11b5417d6b1d5b7768fb94e06319e373e3f
iio: hid-sensors: Convert units and exponent

HID sensor hub specify a default unit and alternative units. This
along with unit exponent can be used adjust scale. This change
change HID sensor data units to IIO defined units for each
sensor type. So in this way user space can use a simply use:
"(data + offset) * scale" to get final result.

Signed-off-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
include/linux/hid-sensor-hub.h