summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2017-11-03 17:20:30 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-11-15 20:21:03 -0800
commitc5c061f9b5707205bb32abdac15dc14a9af14800 (patch)
tree191e89ae1879d53ae28757d046a85e912028d2d8
parent9c090eb0c9fb898f7624fac068070cabe6dc52a6 (diff)
downloadchrome-ec-c5c061f9b5707205bb32abdac15dc14a9af14800.tar.gz
poppy: Lower sensor max ODR
EC seems to miss sample while providing sensor data at 200Hz. Limit sensors ODR to 100Hz. BUG=b:67112751 BRANCH=none TEST=compile, tbd Change-Id: Ic324c3d989854ae8b7f6b27bf6338266ce01ceda Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/753434 Commit-Ready: Li1 Feng <li1.feng@intel.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/poppy/board.h2
-rw-r--r--include/config.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/board/poppy/board.h b/board/poppy/board.h
index aedd0c1e86..03076417d2 100644
--- a/board/poppy/board.h
+++ b/board/poppy/board.h
@@ -117,6 +117,8 @@
#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4)
#define BMM150_I2C_ADDRESS BMM150_ADDR0 /* 8-bit address */
#define CONFIG_MAG_CALIBRATE
+/* Lower maximal ODR to 100Hz */
+#define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ 100000
/* FIFO size is in power of 2. */
#define CONFIG_ACCEL_FIFO 1024
diff --git a/include/config.h b/include/config.h
index f52aae0b87..43e487a3df 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1015,8 +1015,11 @@
/* Support EC to Internal bus bridge. */
#undef CONFIG_EC2I
-/* EC capable of sensor speeds up to 200000 mHz */
-#define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ 200000
+/* Usually, EC capable of sensor speeds up to 200000 mHz */
+#define CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ 200000
+
+/* Maximal EC sampling rate */
+#undef CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ
/*
* Allow board to override the feature bitmap provided through host command
@@ -3135,4 +3138,8 @@
#define CONFIG_SERIALNO_LEN 28
#endif
+#ifndef CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ
+#define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ \
+ CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ
+#endif
#endif /* __CROS_EC_CONFIG_H */