aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/common
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-07-18 16:28:24 -0700
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-07-27 20:11:18 +0100
commited1f2e85da79274f3dc4092953f1359eb732f0c6 (patch)
treea2b5cf8552301ea4f05d1170211a8006302999f8 /include/linux/iio/common
parentiio: light: apds9960: Fix a typo (diff)
downloadlinux-dev-ed1f2e85da79274f3dc4092953f1359eb732f0c6.tar.xz
linux-dev-ed1f2e85da79274f3dc4092953f1359eb732f0c6.zip
iio: cros_ec: Add calibscale for 3d MEMS
Add calibration scale support to accel, gyro and magnetometer. Check on eve with current firmware, check reading calibscale returns 1.0, check with newer firmware values are applied. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/common')
-rw-r--r--include/linux/iio/common/cros_ec_sensors_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/iio/common/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h
index 0c636b9fe8d7..bb03a252bd04 100644
--- a/include/linux/iio/common/cros_ec_sensors_core.h
+++ b/include/linux/iio/common/cros_ec_sensors_core.h
@@ -62,7 +62,10 @@ struct cros_ec_sensors_core_state {
enum motionsensor_type type;
enum motionsensor_location loc;
- s16 calib[CROS_EC_SENSOR_MAX_AXIS];
+ struct calib_data {
+ s16 offset;
+ u16 scale;
+ } calib[CROS_EC_SENSOR_MAX_AXIS];
u8 samples[CROS_EC_SAMPLE_SIZE];