summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorEnrico Granata <egranata@chromium.org>2019-06-06 10:45:38 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-10 20:32:41 +0000
commit1d5f1604963d7f4a51b2b4836db5662777a9fe13 (patch)
tree260eb5250744fca74c087dc05c6807c393c1fd27 /driver
parent25c9cb9e94d2fe49eacc86d9bc478e0cb010aac2 (diff)
downloadchrome-ec-1d5f1604963d7f4a51b2b4836db5662777a9fe13.tar.gz
driver: set Kionix accel min frequency to 12.5Hz
The EC is running at 10Hz itself, so it won't be able to properly handle frequencies below that threshold, and data will end up being sent to the kernel at 10Hz. This is a source of CTS issues on some devices, as Android expects to be able to program the sensor to send data at 1Hz given the sensor's configuration parameters. Fix the issue by picking the closest frequency above 10Hz that the accelerometer supports, i.e. 12.5Hz BUG=b:134422740 BRANCH=oak TEST=run CtsSensorTestCases, observe it pass Change-Id: I56772009817e3cbd452e96637c0a78f54f3854c7 Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1647363 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/accel_kx022.h2
-rw-r--r--driver/accel_kxcj9.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/driver/accel_kx022.h b/driver/accel_kx022.h
index f7f2f848a8..c6f02edcb0 100644
--- a/driver/accel_kx022.h
+++ b/driver/accel_kx022.h
@@ -135,7 +135,7 @@
#define KX022_INC2_XNWUE BIT(5)
/* Min and Max sampling frequency in mHz */
-#define KX022_ACCEL_MIN_FREQ 781
+#define KX022_ACCEL_MIN_FREQ 12500
#define KX022_ACCEL_MAX_FREQ MOTION_MAX_SENSOR_FREQUENCY(1600000, 6250)
#endif /* __CROS_EC_ACCEL_KX022_H */
diff --git a/driver/accel_kxcj9.h b/driver/accel_kxcj9.h
index 823ef5dc39..e7eab1dfd7 100644
--- a/driver/accel_kxcj9.h
+++ b/driver/accel_kxcj9.h
@@ -105,7 +105,7 @@
#define KXCJ9_OSA_FIELD 0xf
/* Min and Max sampling frequency in mHz */
-#define KXCJ9_ACCEL_MIN_FREQ 781
+#define KXCJ9_ACCEL_MIN_FREQ 12500
#define KXCJ9_ACCEL_MAX_FREQ MOTION_MAX_SENSOR_FREQUENCY(1600000, 6250)
#endif /* __CROS_EC_ACCEL_KXCJ9_H */