From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755190AbcJGSRs (ORCPT ); Fri, 7 Oct 2016 14:17:48 -0400 Received: from mga07.intel.com ([134.134.136.100]:44604 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbcJGSRi (ORCPT ); Fri, 7 Oct 2016 14:17:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,456,1473145200"; d="scan'208";a="17374168" From: "Bacchewar, Nilesh" To: Andy Shevchenko CC: Mika Westerberg , "Krogerus, Heikki" , Linus Walleij , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts Thread-Topic: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts Thread-Index: AQHSIMStNpyF9Rm9zE+f6YG0IdCphaCdSnXg Date: Fri, 7 Oct 2016 18:17:36 +0000 Message-ID: References: <1474499002-76446-1-git-send-email-nilesh.bacchewar@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u97IHpTs027160 Here, Its marking GPIO controller IRQ line as wake capable not GPIO lines. Regards, Nilesh -----Original Message----- From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] Sent: Friday, October 7, 2016 10:59 AM To: Bacchewar, Nilesh Cc: Mika Westerberg ; Krogerus, Heikki ; Linus Walleij ; linux-gpio@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts On Thu, Sep 22, 2016 at 2:03 AM, Nilesh Bacchewar wrote: > On some Intel BXT platform, wake-up from suspend-to-idle on pressing > power-button is not working. Its noticed that gpio-keys driver marking > the second level IRQ/power-button as wake capable but Intel pintctrl > driver is missing to mark GPIO chip/controller IRQ which first level > IRQ as wake cable if its GPIO pin IRQ is wakeble. So, though the first > level IRQ gets generated on power-button press, since it is not marked > as wake capable resume/wake-up flow is not happening. > Intel pintctrl/GPIO driver need to mark GPIO chip/controller IRQ > (first level IRQ) as wake capable iff GPIO pin's IRQ (second level > IRQ) is marked as wake cable. > if (on) > - gpe_en |= BIT(gpp_offset); > + enable_irq_wake(pctrl->irq); > else > - gpe_en &= ~BIT(gpp_offset); > - writel(gpe_en, community->regs + GPI_GPE_EN + gpp * 4); > - > - raw_spin_unlock_irqrestore(&pctrl->lock, flags); > + disable_irq_wake(pctrl->irq); Shouldn't be refcounting here or I missed something? What I think of is 2+ GPIO lines marked as wake capable IRQ sources and one of them is disabled earlier by some reason. -- With Best Regards, Andy Shevchenko