* [PATCH] iio: Correct description how to convert microtesla to gauss
@ 2013-10-19 17:17 Peter Meerwald
2013-10-20 21:38 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Peter Meerwald @ 2013-10-19 17:17 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, ldewangan, Peter Meerwald
this just fixes the comment; however, I'm not sure if the driver reports
measurements correctly; the raw values are 0.3 uT / LSB; IIO is supposed
to report magnetic fields in Gauss, so the scale should be around 1/300
(ignoring ASA) -- but value and scale are returned as VAL_INT
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
drivers/iio/magnetometer/ak8975.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 7105f22..ff284e5 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -263,7 +263,7 @@ static int ak8975_setup(struct i2c_client *client)
*
* HuT = H * 1229/4096, or roughly, 3/10.
*
- * Since 1uT = 100 gauss, our final scale factor becomes:
+ * Since 1uT = 0.01 gauss, our final scale factor becomes:
*
* Hadj = H * ((ASA + 128) / 256) * 3/10 * 100
* Hadj = H * ((ASA + 128) * 30 / 256
--
1.8.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: Correct description how to convert microtesla to gauss
2013-10-19 17:17 [PATCH] iio: Correct description how to convert microtesla to gauss Peter Meerwald
@ 2013-10-20 21:38 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-10-20 21:38 UTC (permalink / raw)
To: Peter Meerwald, linux-iio; +Cc: ldewangan
On 10/19/13 18:17, Peter Meerwald wrote:
> this just fixes the comment; however, I'm not sure if the driver reports
> measurements correctly; the raw values are 0.3 uT / LSB; IIO is supposed
> to report magnetic fields in Gauss, so the scale should be around 1/300
> (ignoring ASA) -- but value and scale are returned as VAL_INT
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the togreg branch of iio.git
Thanks,
>
> ---
> drivers/iio/magnetometer/ak8975.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index 7105f22..ff284e5 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -263,7 +263,7 @@ static int ak8975_setup(struct i2c_client *client)
> *
> * HuT = H * 1229/4096, or roughly, 3/10.
> *
> - * Since 1uT = 100 gauss, our final scale factor becomes:
> + * Since 1uT = 0.01 gauss, our final scale factor becomes:
> *
> * Hadj = H * ((ASA + 128) / 256) * 3/10 * 100
> * Hadj = H * ((ASA + 128) * 30 / 256
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-20 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-19 17:17 [PATCH] iio: Correct description how to convert microtesla to gauss Peter Meerwald
2013-10-20 21:38 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).