mfd: cros_ec: Add helper for event notifier.

Add cros_ec_get_event() entry point to retrieve event within functions
called by the notifier.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
This commit is contained in:
Gwendal Grignou
2017-05-16 17:46:48 +02:00
committed by Benson Leung
parent 32c1431eea
commit 68c35ea25b
2 changed files with 30 additions and 0 deletions

View File

@@ -300,6 +300,16 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev);
*/
int cros_ec_get_next_event(struct cros_ec_device *ec_dev);
/**
* cros_ec_get_host_event - Return a mask of event set by the EC.
*
* When MKBP is supported, when the EC raises an interrupt,
* We collect the events raised and call the functions in the ec notifier.
*
* This function is a helper to know which events are raised.
*/
u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
/* sysfs stuff */
extern struct attribute_group cros_ec_attr_group;
extern struct attribute_group cros_ec_lightbar_attr_group;