]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iio: mma8452: Use correct acceleration units.
authorMartin Fuzzey <mfuzzey@parkeon.com>
Fri, 7 Nov 2014 13:54:00 +0000 (13:54 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 12 Jul 2014 12:18:55 +0000 (13:18 +0100)
commit71702e6e52c8312f4c6797a9787d0f8b5656156f
tree21bf3ee4d0166292776d5097f10794d138aa8248
parent78b3321610bf920d7fceb1a0236faa881be0bcf3
iio: mma8452: Use correct acceleration units.

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

The fullscale raw value for the mma8452 (-2048) corresponds to -2G, -4G or -8G
depending on the seleted mode.

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

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
drivers/iio/accel/mma8452.c