]> git.baikalelectronics.ru Git - kernel.git/commit
iio: imu: fxos8700: fix MAGN sensor scale and unit
authorCarlos Song <carlos.song@nxp.com>
Wed, 18 Jan 2023 07:42:27 +0000 (15:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:19 +0000 (11:28 +0100)
commit8ef3931d52360c65403471c2e50657c7847feaf6
treeb42e5d4e7796977611e7ff4404465878d7a6e330
parent00407d09889fd6c539fb23961655fff462f6be0a
iio: imu: fxos8700: fix MAGN sensor scale and unit

commit 2acd031347f645871959a799238a7caf6803aa18 upstream.

+/-1200uT is a MAGN sensor full measurement range. Magnetometer scale
is the magnetic sensitivity parameter. It is referenced as 0.1uT
according to datasheet and magnetometer channel unit is Gauss in
sysfs-bus-iio documentation. Gauss and uTesla unit conversion
relationship as follows: 0.1uT = 0.001Gs.

Set magnetometer scale and available magnetometer scale as fixed 0.001Gs.

Fixes: 2c7e7594a2fd ("iio: imu: Add support for the FXOS8700 IMU")
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Link: https://lore.kernel.org/r/20230118074227.1665098-5-carlos.song@nxp.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/fxos8700_core.c