From patchwork Fri Aug 17 21:21:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Chandra Sadineni X-Patchwork-Id: 10569377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 988CC109C for ; Fri, 17 Aug 2018 21:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A452BF49 for ; Fri, 17 Aug 2018 21:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F58F2BF44; Fri, 17 Aug 2018 21:21:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5863D2BF4F for ; Fri, 17 Aug 2018 21:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbeHRA0n (ORCPT ); Fri, 17 Aug 2018 20:26:43 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:47051 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbeHRA0n (ORCPT ); Fri, 17 Aug 2018 20:26:43 -0400 Received: by mail-pf1-f195.google.com with SMTP id u24-v6so4002570pfn.13 for ; Fri, 17 Aug 2018 14:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=IA6SmaLVr+ETtsp29EXWBRBcXR13M9iZ3XYAYd82Q9o=; b=mnkFNYGbE4ItU8JFkl0o1h6OsVYA1dNCw2zR9FuGBd0mAB3AwohCyEcm67wvB9VyUd KJgPKcrzgpxJWV0npPnD0RDO5RjYQqwI9eKvtpoGvG4IKb8Fdy5jxzRvX9MCyTRCZn63 U9bEBjGzNIvxlpclSyHOHbx1HCmxqKkRldAFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=IA6SmaLVr+ETtsp29EXWBRBcXR13M9iZ3XYAYd82Q9o=; b=Cq5K8lNxd/gw2HrDBCxWSsBmWV3ZudmnSXhkIK1zEqBTPgrDgr8+98n9xzZSVOv/09 llYpRsipypExD+W9yqrLbF4h09kuLoorOshE62xUR+wSmQb+EOlYjVDMUX3m9gC+vZEs 0jutxow2bfTNSDqpwTUFViH/14ryKQTzOHYOvvyHJk8BctzEE69AbRfqBH7n9ozQYxgt X/MkGFmNKIxoyqH1EHJEa1P1iN0h8puEFZ9FpixSyCjCWLIr+fihhnHntxKjmzYSg6Er Vtu445H7aTq0C5EFuygi8suBTK5xA2S9dWGkV5u3MPC9hdKCo/tB9cDkiuVFujzVahJ1 Rc9w== X-Gm-Message-State: AOUpUlEU/54DNVx2/kw0w6yA2fFKsQyDcKs3c4oWfTfAprpscZHpNKrw VXieKGWWse3JQpqI8taBjrqRYg== X-Google-Smtp-Source: AA+uWPz9Hx40jZqVQ12/qGPpQVp5q8pFQ9LYZhiVLfrLDDv3+4QyVMN2DrelVSZSZTs/RkSlJKCwjw== X-Received: by 2002:a63:788b:: with SMTP id t133-v6mr34347695pgc.329.1534540904936; Fri, 17 Aug 2018 14:21:44 -0700 (PDT) Received: from ravisadineni0.mtv.corp.google.com ([2620:15c:202:1:9f2c:2145:3c42:4e88]) by smtp.gmail.com with ESMTPSA id h10-v6sm5640989pfj.78.2018.08.17.14.21.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Aug 2018 14:21:44 -0700 (PDT) From: RaviChandra Sadineni 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 Message-Id: <20180817212135.222689-1-ravisadineni@chromium.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180810082344eucas1p2c525a61cb176b4ab1dab22347afd539b~JeE3uTBkU1731217312eucas1p2T@eucas1p2.samsung.com> References: <20180810082344eucas1p2c525a61cb176b4ab1dab22347afd539b~JeE3uTBkU1731217312eucas1p2T@eucas1p2.samsung.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: RaviChandra Sadineni 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 Tested-by: Marek Szyprowski --- 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); }