]> 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)
commitab0bb9c5f04819e05b7b9571b5193038496c0318
treeb42e5d4e7796977611e7ff4404465878d7a6e330
parent9928f0e09652faf48974b519b5ba69c86ad913c0
iio: imu: fxos8700: fix MAGN sensor scale and unit

commit 06dff4d81d87d2b129d556a8ca093ee16afe9087 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: 566d166b3663 ("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