OSDN Git Service

mfd: cros_ec: Add MKBP event support
authorVic Yang <victoryang@google.com>
Wed, 10 Aug 2016 17:05:24 +0000 (19:05 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 31 Aug 2016 09:50:59 +0000 (10:50 +0100)
commit6f1d912b687d3d17c1731f5bda3b5d6703bce4a0
treee3a0ad0da285ff23c315a23eb4d00661c7ad16f3
parent694d0d0bb2030d2e36df73e2d23d5770511dbc8d
mfd: cros_ec: Add MKBP event support

Newer revisions of the ChromeOS EC add more events besides the keyboard
ones. So handle interrupts in the MFD driver and let consumers register
for notifications for the events they might care.

To keep backward compatibility, if the EC doesn't support MKBP event, we
fall back to the old MKBP key matrix host command.

Cc: Randall Spangler <rspangler@chromium.org>
Cc: Vincent Palatin <vpalatin@chromium.org>
Cc: Benson Leung <bleung@chromium.org>
Signed-off-by: Vic Yang <victoryang@google.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec.c
drivers/platform/chrome/cros_ec_proto.c
include/linux/mfd/cros_ec.h
include/linux/mfd/cros_ec_commands.h