aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/common
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-07-15 16:14:51 -0700
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-07-27 23:05:25 +0100
commit12bf745c9afb6755acba186091bcbb61229f4165 (patch)
tree8b5175bf53e45a8ad28e4ba06f8d33f32dd3ef35 /include/linux/iio/common
parentiio: common: cros_ec_sensors: determine protocol version (diff)
downloadlinux-dev-12bf745c9afb6755acba186091bcbb61229f4165.tar.xz
linux-dev-12bf745c9afb6755acba186091bcbb61229f4165.zip
iio: cros_ec: Add sign vector in core for backward compatibility
To allow cros_ec iio core library to be used with legacy device, add a vector to rotate sensor data if necessary: legacy devices are not reporting data in HTML5/Android sensor referential. Check the data is not rotated on recent chromebooks that use the HTML5 standard to present sensor data. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Douglas Anderson <dianders@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.h2
1 files changed, 1 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 bb03a252bd04..6f13c73bac3d 100644
--- a/include/linux/iio/common/cros_ec_sensors_core.h
+++ b/include/linux/iio/common/cros_ec_sensors_core.h
@@ -66,7 +66,7 @@ struct cros_ec_sensors_core_state {
s16 offset;
u16 scale;
} calib[CROS_EC_SENSOR_MAX_AXIS];
-
+ s8 sign[CROS_EC_SENSOR_MAX_AXIS];
u8 samples[CROS_EC_SAMPLE_SIZE];
int (*read_ec_sensors_data)(struct iio_dev *indio_dev,