summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/kxsd9.c
diff options
context:
space:
mode:
authorLI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>2022-05-29 09:18:53 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-14 13:53:09 +0300
commit38d5cd1e7ee0b3e96f39ed3a93cada1c71352c53 (patch)
tree29df34684aa2de2ba15191e5c38b9ff3b0f7f60b /drivers/iio/accel/kxsd9.c
parent24fb2d3c4620a43e0e876926b1835283871b3cfe (diff)
downloadlinux-38d5cd1e7ee0b3e96f39ed3a93cada1c71352c53.tar.xz
iio: accel: sca3300: Add inclination channels
Different from SCA3300, SCL3300 can output inclination angles. Angles are formed from acceleration with following equations: ANG_X = atan2(accx , sqrt(pow(accy , 2) + pow(accz , 2))) ANG_Y = atan2(accy , sqrt(pow(accx , 2) + pow(accz , 2))) ANG_Z = atan2(accz , sqrt(pow(accx , 2) + pow(accy , 2))) The commit adds the output of the raw value, scale and scale_available of angles. New interfaces: in_incli_scale in_incli_scale_available in_incli_x_raw in_incli_y_raw in_incli_z_raw Data converted by application of scale to degrees. Signed-off-by: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> Reviewed-by: Tomas Melin <tomas.melin@vaisala.com> Link: https://lore.kernel.org/r/20220529061853.3044893-6-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/kxsd9.c')
0 files changed, 0 insertions, 0 deletions