diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/cros_ec.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index a5534b1667..c3674908ee 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -415,6 +415,21 @@ int cros_ec_scan_keyboard(struct udevice *dev, struct mbkp_keyscan *scan) return 0; } +int cros_ec_get_next_event(struct udevice *dev, + struct ec_response_get_next_event *event) +{ + int ret; + + ret = ec_command(dev, EC_CMD_GET_NEXT_EVENT, 0, NULL, 0, + event, sizeof(*event)); + if (ret < 0) + return ret; + else if (ret != sizeof(*event)) + return -EC_RES_INVALID_RESPONSE; + + return 0; +} + int cros_ec_read_id(struct udevice *dev, char *id, int maxlen) { struct ec_response_get_version *r; |