linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: RaviChandra Sadineni <ravisadineni@chromium.org>
To: dmitry.torokhov@gmail.com, ravisadineni@chromium.org,
	ravisadineni@google.com, dtor@google.com,
	linux-samsung-soc@vger.kernel.org, tbroch@google.com,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	tfiga@chromium.org
Subject: Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.
Date: Fri, 17 Aug 2018 14:21:35 -0700	[thread overview]
Message-ID: <20180817212135.222689-1-ravisadineni@chromium.org> (raw)
In-Reply-To: <20180810082344eucas1p2c525a61cb176b4ab1dab22347afd539b~JeE3uTBkU1731217312eucas1p2T@eucas1p2.samsung.com>

From: RaviChandra Sadineni <ravisadineni@google.com>

hi Merek,

Unfortunately I could not get the device to boot even after using the exynos_defconfig. 
Can you please try this patch and see if this fixes the issue. If not can you enable the
debug logs and send me the logs.


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 getting key state of
the keyboard in a loop and block the resume. Instead check for events only
if  mkbp is supported.

Signed-off-by: RaviChandra Sadineni <ravisadineni@chromium.org>
---
 drivers/mfd/cros_ec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
index 65a9757a6d21..fe6f83766144 100644
--- a/drivers/mfd/cros_ec.c
+++ b/drivers/mfd/cros_ec.c
@@ -218,7 +218,8 @@ EXPORT_SYMBOL(cros_ec_suspend);
 
 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);
 }
-- 
2.16.4


  reply	other threads:[~2018-08-17 21:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 22:44 [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event Ravi Chandra Sadineni
2018-06-12 23:32 ` Dmitry Torokhov
     [not found] ` <CGME20180803072628eucas1p26abe0cb121b974401759502f8807bb96@eucas1p2.samsung.com>
2018-08-03  7:26   ` Marek Szyprowski
     [not found]     ` <CAEZbON7qLheHFuU6zwArCz=CG03JvnFjcehBGjE4RqROYrMLhQ@mail.gmail.com>
2018-08-03 16:07       ` Dmitry Torokhov
     [not found]         ` <CAEZbON4O0X8Fo6eAbmPOSiB1_Tw7x+Ox3ROoGfZQn72uQGQLkg@mail.gmail.com>
2018-08-06  5:29           ` Marek Szyprowski
2018-08-06  6:16             ` Dmitry Torokhov
2018-08-06  7:15               ` Marek Szyprowski
2018-08-06 23:05                 ` Ravi Chandra Sadineni
2018-08-07 21:59                   ` Ravi Chandra Sadineni
2018-08-08  5:03                     ` Marek Szyprowski
     [not found]                     ` <85a59afc-9dc0-b9fb-7e8f-32731337884c@samsung.com>
2018-08-10  8:23                       ` Marek Szyprowski
2018-08-17 21:21                         ` RaviChandra Sadineni [this message]
2018-08-20  8:52                           ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180817212135.222689-1-ravisadineni@chromium.org \
    --to=ravisadineni@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dtor@google.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=ravisadineni@google.com \
    --cc=tbroch@google.com \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).