From: Beomho Seo <beomho.seo@samsung.com>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Myungjoo Ham <myungjoo.ham@samsung.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
ldewangan@nvidia.com
Subject: [PATCH 0/2] iio: ak8975: Fix calculation formula and add device name
Date: Wed, 29 Jan 2014 14:05:00 +0900 [thread overview]
Message-ID: <52E88BFC.6080704@samsung.com> (raw)
Three months ago Lars-Peter revised description of device driver[1].
Correctly, device's sensitivity is 0.3 uT/LSB typ and One micro tesla equal 0.01 gauss[2].
So I have fixed calculation formula,And then add RAW_TO_GAUSS macro.
Scale are returned as VAL_INT_PLUS_MICRO.
Additionally, I have add device name.
Tested on exynos4412 board, with following result:
-sh-4.1# cat name
ak8975
-sh-4.1# cat in_magn_x_raw
80
-sh-4.1# cat in_magn_x_scale
0.003609
Calculate the result 80 x 0.003609 = 0.28872 Gauss.
0.28872 G equal 288.72 mG
I think this magnitude value is proper level[3].
[1] http://marc.info/?l=linux-iio&m=138220306822747&w=2
[2] http://en.wikipedia.org/wiki/Gauss_(unit)
[3] http://en.wikipedia.org/wiki/Orders_of_magnitude_(magnetic_field)
Beomho Seo (2):
iio: ak8975: Fix calculation formula for microtesla to gauss unit
iio: ak8975: Add device name
drivers/iio/magnetometer/ak8975.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
--
Best Regards,
next reply other threads:[~2014-01-29 5:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 5:05 Beomho Seo [this message]
2014-01-29 8:53 ` [PATCH 0/2] iio: ak8975: Fix calculation formula and add device name Peter Meerwald
2014-02-04 5:52 ` Beomho Seo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E88BFC.6080704@samsung.com \
--to=beomho.seo@samsung.com \
--cc=jh80.chung@samsung.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=ldewangan@nvidia.com \
--cc=linux-iio@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox