]> git.baikalelectronics.ru Git - 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)
commit62cc5d02135801e596f125b80753f10bf21e1308
treebbf60b045296b2e1b05cd9c1e93b5648edc144fb
parent7873be462034751d380647c11c3a1e2672698944
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