Skip to content
Commit c2890547 authored by Daniel Baluta's avatar Daniel Baluta Committed by Jonathan Cameron
Browse files

iio: magnetometer: mmc35240: Fix broken processed value

The current computation for fractional part of the magnetic
field is broken. This patch fixes it by taking a different
approach. We expose the raw reading in milli Gauss (to avoid
rounding errors) with a scale of 0.001.

Thus the final computation is done in userspace where floating
point operation are more relaxed.

Fixes: abeb6b1e

 ("iio: magnetometer: Add support for MEMSIC MMC35240")
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bd35a214
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment