Re: [PATCH] platform/chrome: cros_ec_sensorhub: Increase MAX_DRIFT_PPM to 5000LL

From: Tzung-Bi Shih

Date: Wed Oct 14 2026 - 02:54:18 EST


On Tue, Oct 13, 2026 at 10:58:06AM +0000, Satyam Gupta wrote:
> diff --git a/drivers/platform/chrome/cros_ec_sensorhub_ring.c b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> index 20fa47cbee32..a5215955470f 100644
> --- a/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> +++ b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> @@ -22,7 +22,7 @@
>
> /* Precision of fixed point for the m values from the filter */
> #define M_PRECISION BIT(23)
> -#define MAX_DRIFT_PPM 200LL
> +#define MAX_DRIFT_PPM 5000LL
> #define MAX_M ((s64)(MAX_DRIFT_PPM * M_PRECISION / 1000000))
>
> /* Only activate the filter once we have at least this many elements. */
> @@ -278,7 +278,7 @@ cros_ec_sensor_ring_ts_filter_update(struct cros_ec_sensors_ts_filter_state
> dy = (state->y_history[0] + state->y_offset) - y;
> m = div64_s64(dy * M_PRECISION, dx);
> /*
> - * Clamp the calculated slope to a realistic range (+/- 200 ppm).
> + * Clamp the calculated slope to a realistic range (+/- 5000 ppm).
> * Temporary large jitter spikes can produce huge slopes (e.g. +/- 20000 ppm)
> * that would otherwise corrupt the median filter history.
> */

Applying: platform/chrome: cros_ec_sensorhub: Increase MAX_DRIFT_PPM to 5000LL
error: patch failed: drivers/platform/chrome/cros_ec_sensorhub_ring.c:22
error: drivers/platform/chrome/cros_ec_sensorhub_ring.c: patch does not apply

Until I realized this should apply after [1].

NACK, you should either form them a series or squash the fix into [1].

[1] https://lore.kernel.org/all/20261013105753.1370713-1-sgsatyam@xxxxxxxxxx