]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7ca0e63fb355fdbc3411078268436d66ec046e0a
tree0617fb327f67158998b05dd3b9c604ff96ddb273
parentb9da52312dd13af717c68adaad70b57d3a352a45
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