summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2017-09-20 12:37:35 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-24 00:02:04 -0700
commit2faae86c0828a8772ca73854e8346a8630b8e61a (patch)
tree5bf898ca594739eccdd6f748db8ef84cde9f5bbe
parent1914a56ebc4ff72e75a10f8891aa85b4138c689b (diff)
downloadchrome-ec-2faae86c0828a8772ca73854e8346a8630b8e61a.tar.gz
Kahlee: FIXUP: Optimize g-sensor setting
Kionix Accel does not have FIFO, enable force mode for it. Chrome needs sensor for screen orientation, set to to 10Hz in S0 in the EC. BRANCH=none BUG=b:62029360 TEST=none Change-Id: I5545580f2073e9d1145bd86cfcd594164119cae7 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/675575 Tested-by: Gwendal Grignou <gwendal@google.com> Reviewed-by: Gwendal Grignou <gwendal@google.com>
-rw-r--r--board/kahlee/board.c3
-rw-r--r--board/kahlee/board.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/board/kahlee/board.c b/board/kahlee/board.c
index 9d06a87a78..529081b38d 100644
--- a/board/kahlee/board.c
+++ b/board/kahlee/board.c
@@ -570,8 +570,9 @@ struct motion_sensor_t motion_sensors[] = {
.odr = 0,
.ec_rate = 0,
},
+ /* Setup for AP for rotation detection */
[SENSOR_CONFIG_EC_S0] = {
- .odr = 0,
+ .odr = 10000 | ROUND_UP_FLAG,
.ec_rate = 0,
},
[SENSOR_CONFIG_EC_S3] = {
diff --git a/board/kahlee/board.h b/board/kahlee/board.h
index c780f722d8..07f4d29500 100644
--- a/board/kahlee/board.h
+++ b/board/kahlee/board.h
@@ -292,6 +292,9 @@ void board_reset_pd_mcu(void);
int board_get_version(void);
+/* Sensors without hardware FIFO are in forced mode */
+#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL)
+
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BOARD_H */