From patchwork Fri Aug 11 06:36:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9895019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5D6F60236 for ; Fri, 11 Aug 2017 06:37:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B826928BFA for ; Fri, 11 Aug 2017 06:37:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACE9128C02; Fri, 11 Aug 2017 06:37:52 +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=-6.9 required=2.0 tests=BAYES_00,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 1414E28C00 for ; Fri, 11 Aug 2017 06:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538AbdHKGgo (ORCPT ); Fri, 11 Aug 2017 02:36:44 -0400 Received: from mga11.intel.com ([192.55.52.93]:44352 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406AbdHKGgn (ORCPT ); Fri, 11 Aug 2017 02:36:43 -0400 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2017 23:36:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,356,1498546800"; d="scan'208";a="117906763" Received: from lvzheng-moblsp3.sh.intel.com ([10.239.159.74]) by orsmga004.jf.intel.com with ESMTP; 10 Aug 2017 23:36:40 -0700 From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v3 3/4] ACPI / EC: Add support to handle EC events earlier Date: Fri, 11 Aug 2017 14:36:39 +0800 Message-Id: <344e4a55bac9c1cd53c95eba563cdeeeb23bd479.1502432974.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: <99f23db65bbe89ee856018629654584a96734c84.1501141963.git.lv.zheng@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. This may help to solve driver order issues during resume. Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5be62933..396e81d 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1016,7 +1016,9 @@ static void acpi_ec_start(struct acpi_ec *ec, bool resuming) if (!resuming) { acpi_ec_submit_request(ec); ec_dbg_ref(ec, "Increase driver"); - } + } else if (!ec_freeze_events && + ec_gpe_polling == ACPI_EC_GPE_POLL_RESUME) + __acpi_ec_enable_event(ec); ec_log_drv("EC started"); } spin_unlock_irqrestore(&ec->lock, flags);