iio: kx022a: Fix acceleration value scaling
authorMatti Vaittinen <mazziesaccount@gmail.com>
Thu, 19 Oct 2023 13:23:56 +0000 (16:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:42:37 +0000 (12:42 +0000)
commit60d6d2704056bd83adec09d8717319d844593e8a
treee3a28a8f3003214427290e5e05eb3b8bf0283139
parent1f7213358d846079b88c22ab8b7eb1f5652037c2
iio: kx022a: Fix acceleration value scaling

commit 92bfa4ab1b79be95c4f52d13f5386390f0a513c2 upstream.

The IIO ABI mandates acceleration values from accelerometer to be
emitted in m/s^2. The KX022A was emitting values in micro m/s^2.

Fix driver to report the correct scale values.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reported-by: Jagath Jog J <jagathjog1996@gmail.com>
Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Tested-by: Jagath Jog J <jagathjog1996@gmail.com>
Link: https://lore.kernel.org/r/ZTEt7NqfDHPOkm8j@dc78bmyyyyyyyyyyyyydt-3.rev.dnainternet.fi
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/accel/kionix-kx022a.c