]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: ad2s1200: Add scaling factor for angle channel
authorDavid Veenstra <davidjulianveenstra@gmail.com>
Fri, 18 May 2018 18:23:14 +0000 (20:23 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 May 2018 11:09:47 +0000 (12:09 +0100)
commit3a42026b16c432385a052f49ad8725ec9875788c
tree695f65399bc455771f5ed5a76edb64337c65c8cb
parent98dbb0eeaa6f5c66b837406eb40bc310d1eb5496
staging: iio: ad2s1200: Add scaling factor for angle channel

A scaling factor of approximately 2 * Pi / (2^12 -1) is added,
to scale the 12-bits angular position to radians.

A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of
both the angle channel and angular velocity channel has 7 significant
digits.

Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1200.c