]> git.ipfire.org Git - people/ms/linux.git/commit
iio:bma180: Fix scale factors to report correct acceleration units
authorPeter Meerwald <pmeerw@pmeerw.net>
Wed, 16 Jul 2014 18:32:00 +0000 (19:32 +0100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 19 Aug 2014 12:23:36 +0000 (14:23 +0200)
commit357249fb9640cd72a4e6d8008ce1f1be0154e37c
treef7d2a2c2e23a49998841af5281307acdef4fed4b
parent0a5d8d71f528efeeffa3415fb61846e6f18541ae
iio:bma180: Fix scale factors to report correct acceleration units

commit 381676d5e86596b11e22a62f196e192df6091373 upstream.

The userspace interface for acceleration sensors is documented as using
m/s^2 units [Documentation/ABI/testing/sysfs-bus-iio]

The fullscale raw values for the BMA80 corresponds to -/+ 1, 1.5, 2, etc G
depending on the selected mode.

The scale table was converting to G rather than m/s^2.
Change the scaling table to match the documented interface.

See commit 71702e6e, iio: mma8452: Use correct acceleration units,
for a related fix.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/iio/accel/bma180.c