]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
platform/chrome: cros_ec_sensorhub: Add median filter
authorGwendal Grignou <gwendal@chromium.org>
Fri, 27 Mar 2020 22:34:35 +0000 (15:34 -0700)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Sat, 28 Mar 2020 21:04:32 +0000 (22:04 +0100)
commit93fe48a585905675719835f8269258736de0948f
treebbf60b045296b2e1b05cd9c1e93b5648edc144fb
parentb9b05664ebf6cd58d2a7f9a7cffa119f331114e6
platform/chrome: cros_ec_sensorhub: Add median filter

Events are timestamped in EC time space, their timestamps need to be
converted in host time space.

The assumption is the time delta between when the interrupt is sent
by the EC and when it is receive by the host is a [small] constant.
This is not always true, even with hard-wired interrupt. To mitigate
worst offenders, add a median filter to weed out bigger than expected
delays.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_ec_sensorhub_ring.c
include/linux/platform_data/cros_ec_sensorhub.h