summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-09-09 14:30:47 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-10 22:02:03 +0000
commit917fb7fbd7a3681067d171fb385bb77de31f3ab6 (patch)
tree1258bfbd5badab72a172684914be5c026404ac5d
parent761451afd00f4936c46ed7c917194d5183be46d2 (diff)
downloadchrome-ec-917fb7fbd7a3681067d171fb385bb77de31f3ab6.tar.gz
driver: LSM6DSM: Limit FIFO transfer buffer size
The buffer is allocated on the stack. It is currently 32*6 bytes. This is unnecessarily large as we set the FIFO threshold at 1. Reduce it to 8*6 bytes, the gain of long I2C transactions is negligible and we save some space in the stack. BUG=none BRANCH=none TEST=buildall Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I8b6f9f2bdfe27206d049c1fe0b82df4caaadce09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3150677 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
-rw-r--r--driver/stm_mems_common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/stm_mems_common.h b/driver/stm_mems_common.h
index 1984e5e070..0bdfbc5b84 100644
--- a/driver/stm_mems_common.h
+++ b/driver/stm_mems_common.h
@@ -20,7 +20,7 @@
#define ST_NORMALIZE_RATE(_fs) (1 << __fls(_fs))
#ifdef CONFIG_ACCEL_FIFO
-#define FIFO_BUFFER_NUM_PATTERN 32
+#define FIFO_BUFFER_NUM_PATTERN 8
/* Define number of data to be read from FIFO each time
* It must be a multiple of OUT_XYZ_SIZE.
* In case of LSM6DSM FIFO contains pattern depending ODR