From patchwork Wed Jul 9 12:45:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 4514801 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A70A1BEEAA for ; Wed, 9 Jul 2014 12:27:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EE8A20364 for ; Wed, 9 Jul 2014 12:27:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81E522035C for ; Wed, 9 Jul 2014 12:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755532AbaGIM1N (ORCPT ); Wed, 9 Jul 2014 08:27:13 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:64269 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751351AbaGIM1L (ORCPT ); Wed, 9 Jul 2014 08:27:11 -0400 Received: from afep121.neoplus.adsl.tpnet.pl [95.49.119.121] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id db47246f8f1e6454; Wed, 9 Jul 2014 14:27:08 +0200 From: "Rafael J. Wysocki" To: Dmitry Torokhov , "Li, Aubrey" Cc: "linux-input@vger.kernel.org" , LKML , One Thousand Gnomes , Linux PM list Subject: Re: [PATCH] GPIO button wth wakeup attribute is supposed to wake the system up Date: Wed, 09 Jul 2014 14:45:15 +0200 Message-ID: <4301161.i6ArOLmcsg@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.15.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20140709005434.GB14935@core.coreip.homeip.net> References: <53A2340D.9030503@linux.intel.com> <18261725.84uqcyZ8CE@vostro.rjw.lan> <20140709005434.GB14935@core.coreip.homeip.net> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tuesday, July 08, 2014 05:54:35 PM Dmitry Torokhov wrote: > On Wed, Jul 09, 2014 at 02:59:33AM +0200, Rafael J. Wysocki wrote: > > On Tuesday, July 08, 2014 05:15:06 PM Dmitry Torokhov wrote: > > > On Wed, Jul 09, 2014 at 01:06:07AM +0200, Rafael J. Wysocki wrote: [cut] > > > > > > When device driver marks IRQ as a wakeup source I believe it is prepared > > > to handle it (or it would shut it off explicitly). > > > > I can agree with that. > > > > Are you suggesting that __disable_irq() should check irq_data for > > IRQD_WAKEUP_STATE and skip the IRQ (in the 'suspend' case) if that is set? > > Yes, something like that. OK Aubrey, can you please check if the appended patch helps on the T100? Rafael --- kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/kernel/irq/manage.c =================================================================== --- linux-pm.orig/kernel/irq/manage.c +++ linux-pm/kernel/irq/manage.c @@ -385,7 +385,8 @@ setup_affinity(unsigned int irq, struct void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend) { if (suspend) { - if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND)) + if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND) + || irqd_has_set(&desc->irq_data, IRQD_WAKEUP_STATE)) return; desc->istate |= IRQS_SUSPENDED; }