From: Peter Meerwald Date: Sat, 19 Oct 2013 17:17:00 +0000 (+0100) Subject: iio: Correct description how to convert microtesla to gauss X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb03610a9ceb4ebbe70c4a68a5bf9fb509a233c3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: Correct description how to convert microtesla to gauss 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 7105f22d6cd7..ff284e5afd95 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