]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hid-sensor-rotation: Fix quaternion data not correct
authorYe Xiang <xiang.ye@intel.com>
Sat, 30 Jan 2021 10:25:46 +0000 (18:25 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 11 Mar 2021 20:46:56 +0000 (20:46 +0000)
commit47745ee191117cc532ddc7697fbb376a7020d67a
treed03dd02d30e52aebaffd3f0fe4db0a49ec4e5653
parent1255224afa1220094a24450b041d8b0c37ac2bb2
iio: hid-sensor-rotation: Fix quaternion data not correct

Because the data of HID_USAGE_SENSOR_ORIENT_QUATERNION defined by ISH FW
is s16, but quaternion data type is in_rot_quaternion_type(le:s16/32X4>>0),
need to transform data type from s16 to s32

May require manual backporting.

Fixes: 1037baca5392 ("iio: hid-sensors: Added device rotation support")
Signed-off-by: Ye Xiang <xiang.ye@intel.com>
Link: https://lore.kernel.org/r/20210130102546.31397-1-xiang.ye@intel.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/orientation/hid-sensor-rotation.c