linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org
Cc: ldewangan@nvidia.com
Subject: Re: [PATCH] iio: Correct description how to convert microtesla to gauss
Date: Sun, 20 Oct 2013 22:38:21 +0100	[thread overview]
Message-ID: <52644D4D.9080309@kernel.org> (raw)
In-Reply-To: <1382203063-31141-1-git-send-email-pmeerw@pmeerw.net>

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
> 

      reply	other threads:[~2013-10-20 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=52644D4D.9080309@kernel.org \
    --to=jic23@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).