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>
This commit is contained in:
committed by
Jonathan Cameron
parent
3cf9df0095
commit
12bf745c9a
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user