From ddd4a0d63583c4b9027a1140f443e685814e33dc Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Thu, 16 Jun 2022 14:26:42 +0800 Subject: [PATCH] driver/sensor: sync batch and interval when update interval Signed-off-by: Jiuzhu Dong --- drivers/sensors/sensor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index e054116a8d..fb22d1c855 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -245,6 +245,11 @@ update: { return ret; } + + if (upper->state.min_latency != ULONG_MAX) + { + lower->ops->batch(filep, lower, &upper->state.min_latency); + } } upper->state.min_interval = min_interval;