46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
|
commit 987775dbc2ad01135e429a2ba102d26515f45a3b [log] [tgz]
|
||
|
author RaviChandra Sadineni <ravisadineni@chromium.org> Mon Aug 20 15:34:19 2018
|
||
|
committer chrome-bot <chrome-bot@chromium.org> Wed Apr 03 19:28:35 2019
|
||
|
tree 1d07649cd5eb868676b3d6c21be4db64f6e4d36f
|
||
|
parent e68bb06b8ad62d1bd5d7081ba58e2c765ee7cb20 [diff]
|
||
|
|
||
|
UPSTREAM: mfd: cros_ec: Check for mkbp events on resume only if supported.
|
||
|
|
||
|
Currently on every resume we check for mkbp events and notify the
|
||
|
clients. This helps in identifying the wakeup sources. But on devices
|
||
|
that do not support mkbp protocol, we might end up querying key state of
|
||
|
the keyboard in a loop which blocks the resume. Instead check for events
|
||
|
only if mkbp is supported.
|
||
|
|
||
|
Signed-off-by: RaviChandra Sadineni <ravisadineni@chromium.org>
|
||
|
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||
|
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
||
|
Signed-off-by: Lee Jones <lee.jones@linaro.org>
|
||
|
(cherry picked from commit 61cc15dac01ae84281222452e338ca060179d8b1)
|
||
|
|
||
|
BUG=chromium:941638
|
||
|
TEST=Suspend/resume doesn't hang anymore
|
||
|
|
||
|
Change-Id: I3914077c8feae2025ed98443b8ea2f958160a3e6
|
||
|
Signed-off-by: Douglas Anderson <dianders@chromium.org>
|
||
|
Reviewed-on: https://chromium-review.googlesource.com/1549746
|
||
|
Reviewed-by: Sean Paul <seanpaul@chromium.org>
|
||
|
Reviewed-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
|
||
|
|
||
|
diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
|
||
|
index f4ad853..02774d9 100644
|
||
|
--- a/drivers/mfd/cros_ec.c
|
||
|
+++ b/drivers/mfd/cros_ec.c
|
||
|
|
||
|
@@ -225,7 +225,8 @@
|
||
|
|
||
|
static void cros_ec_report_events_during_suspend(struct cros_ec_device *ec_dev)
|
||
|
{
|
||
|
- while (cros_ec_get_next_event(ec_dev, NULL) > 0)
|
||
|
+ while (ec_dev->mkbp_event_supported &&
|
||
|
+ cros_ec_get_next_event(ec_dev, NULL) > 0)
|
||
|
blocking_notifier_call_chain(&ec_dev->event_notifier,
|
||
|
1, ec_dev);
|
||
|
}
|
||
|
|