[PATCH v5 5/6] platform/chrome: cros_ec_sensorhub: Increase TS_HISTORY_BORED_US to 2s
From: Satyam Gupta
Date: Wed Oct 14 2026 - 03:46:57 EST
From: Scott Collyer <scollyer@xxxxxxxxxx>
Increase the TS_HISTORY_BORED_US gap threshold from 0.5 seconds
(500,000 us) to 2.0 seconds (2,000,000 us) to accommodate normal sensor
batching flush intervals (which can be 1 to 2 seconds long) without
repeatedly tearing down the timestamp filter, while still resetting the
filter across actual long idle gaps or suspend.
Signed-off-by: Scott Collyer <scollyer@xxxxxxxxxx>
Signed-off-by: Satyam Gupta <sgsatyam@xxxxxxxxxx>
---
drivers/platform/chrome/cros_ec_sensorhub_ring.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_sensorhub_ring.c b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
index 4d814e2d7297..7740bb42b1df 100644
--- a/drivers/platform/chrome/cros_ec_sensorhub_ring.c
+++ b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
@@ -30,9 +30,13 @@
/*
* If we don't have any history entries for this long, empty the filter to
- * make sure there are no big discontinuities.
+ * make sure there are no big discontinuities (e.g. after suspend or long idle).
+ *
+ * This is set to 2 seconds to accommodate normal batching flush intervals
+ * (which can be up to 1-2 seconds) without constantly resetting the filter,
+ * while still ensuring a reset occurs during actual long gaps or suspend.
*/
-#define TS_HISTORY_BORED_US 500000
+#define TS_HISTORY_BORED_US 2000000
/* To measure by how much the filter is overshooting, if it happens. */
#define FUTURE_TS_ANALYTICS_COUNT_MAX 100
--
2.56.0.385.gd3acb90ef8-goog