소스 검색

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 <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald 11 년 전
부모
커밋
eb03610a9c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/iio/magnetometer/ak8975.c

+ 1 - 1
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.
  * 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) / 256) * 3/10 * 100
  * Hadj = H * ((ASA + 128) * 30 / 256
  * Hadj = H * ((ASA + 128) * 30 / 256