diff options
author | LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn> | 2022-05-29 09:18:53 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-14 13:53:09 +0300 |
commit | 38d5cd1e7ee0b3e96f39ed3a93cada1c71352c53 (patch) | |
tree | 29df34684aa2de2ba15191e5c38b9ff3b0f7f60b /drivers/iio/accel/adxl367_spi.c | |
parent | 24fb2d3c4620a43e0e876926b1835283871b3cfe (diff) | |
download | linux-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/adxl367_spi.c')
0 files changed, 0 insertions, 0 deletions