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)
commitf9db7370be0e93ce4264781e1ada631a32a61e9b
tree695f65399bc455771f5ed5a76edb64337c65c8cb
parentd3e6ed841671de3b25776b5e91f33112e8f5bca6
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