summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-07-01 12:39:07 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-15 03:39:12 +0000
commite095bad64e5a9e27bdfadae2c0746d2ee151ef67 (patch)
treeebe804d050f0d3c8c9cb2c3ae7308e028173c545 /include/accelgyro.h
parentc0f78b4c0aca20203fefbc96c7e52c709455c06b (diff)
downloadchrome-ec-e095bad64e5a9e27bdfadae2c0746d2ee151ef67.tar.gz
driver: bmi160 Add code for calibration
Add code for set/getting calibration data on bmi160 Add code to perform FOC (Fast Online Calibration) on bmi160. Add delay after getting out of suspend to be sure sensor is available. BRANCH=smaug TEST=Check sensors are properly calibrated on Smaug: Perform calibration: echo 1 > /sys/bus/iio/devices/iio:device1/calibrate Read calibration values: cat /sys/bus/iio/devices/iio:device1/*_calibbias Check the values are translated properly. Write calibration values and check it affects the sensor output. BUG=chromium:506101,chrome-os-partner:39900 Change-Id: Ib9aad9bbd90b4249625641d68febf94b69aa4987 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/283165 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 1c1c92566d..af15c0cd58 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -91,6 +91,7 @@ struct accelgyro_drv {
int (*get_offset)(const struct motion_sensor_t *s,
int16_t *offset,
int16_t *temp);
+ int (*perform_calib)(const struct motion_sensor_t *s);
#ifdef CONFIG_ACCEL_INTERRUPTS
/**
* Setup a one-time accel interrupt. If the threshold is low enough, the