Searched hist:a53f945879c0cb9de3a4c05a665f5157884b5208 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/iio/imu/ |
H A D | fxos8700_core.c | diff a53f945879c0cb9de3a4c05a665f5157884b5208 Thu Dec 08 01:19:08 CST 2022 Carlos Song <carlos.song@nxp.com> iio: imu: fxos8700: fix IMU data bits returned to user space
ACCEL output data registers contain the X-axis, Y-axis, and Z-axis 14-bit left-justified sample data and MAGN output data registers contain the X-axis, Y-axis, and Z-axis 16-bit sample data. The ACCEL raw register output data should be divided by 4 before sent to userspace.
Apply a 2 bits signed right shift to the raw data from ACCEL output data register but keep that from MAGN sensor as the origin.
Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU") Signed-off-by: Carlos Song <carlos.song@nxp.com> Link: https://lore.kernel.org/r/20221208071911.2405922-5-carlos.song@nxp.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|