summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-04-20 22:40:22 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-05-03 09:47:22 +0100
commit166365273fa069bedb3f90bc6ccaf758448c51d9 (patch)
treea31d59551316cf245885220f87fc8cf744d849fa /samples
parent55ecaf1717c619edce304ba27d68c18876af6637 (diff)
iio: magnetometer: ak8974: Provide scaling
The manual for the HSCDTD008A gives us a scaling for the three axis as +/- 2.4mT (24 Gauss) per axis. The manual for the AMI305 and AMI306 gives us a scaling for the three axis as +/- 12 Gauss per axis. Tests with the HSCDTD008A sensor, cat the raw values: $ cat in_magn_*_raw raw 45 189 -19 The scaling factor in in_magn_*_scale is 0.001464843, which gives: 0.065 Gauss 0.277 Gauss -0.027 Gauss The earths magnetic field is in the range of 0.25 to 0.65 Gauss on the surface according to Wikipedia, so these seem like reasonable values. Again we are guessing that the AK8974 has a 12 bit ADC, based on the similarity with AMI305 and AMI306. Cc: Nick Reitemeyer <nick.reitemeyer@web.de> Cc: Stephan Gerhold <stephan@gerhold.net> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions