platform/chrome: cros_ec: handle MKBP more events flag
authorEnrico Granata <egranata@chromium.org>
Tue, 19 Nov 2019 12:45:46 +0000 (13:45 +0100)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 21 Nov 2019 10:23:15 +0000 (11:23 +0100)
commit3300fdd630d4d3d96e3ba9af63a740d3a4e8fc61
tree0617fb327f67158998b05dd3b9c604ff96ddb273
parentda946589b1b9b643c538e6c977ac0f963362ee3c
platform/chrome: cros_ec: handle MKBP more events flag

The ChromeOS EC has support for signaling to the host that a single IRQ
can serve multiple MKBP (Matrix KeyBoard Protocol) events.

Doing this serves an optimization purpose, as it minimizes the number of
round-trips into the interrupt handling machinery, and it proves
beneficial to sensor timestamping as it keeps the desired synchronization
of event times between the two processors.

This patch adds kernel support for this EC feature, allowing the ec_irq
to loop until all events have been served.

Signed-off-by: Enrico Granata <egranata@chromium.org>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_ec.c
drivers/platform/chrome/cros_ec_ishtp.c
drivers/platform/chrome/cros_ec_lpc.c
drivers/platform/chrome/cros_ec_proto.c
drivers/platform/chrome/cros_ec_rpmsg.c
include/linux/platform_data/cros_ec_proto.h