From patchwork Fri Nov 27 17:21:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 57371 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1285956lbb; Fri, 27 Nov 2015 09:21:25 -0800 (PST) X-Received: by 10.98.71.217 with SMTP id p86mr50049317pfi.162.1448644885241; Fri, 27 Nov 2015 09:21:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si21265030pas.127.2015.11.27.09.21.25; Fri, 27 Nov 2015 09:21:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755079AbbK0RVY (ORCPT + 4 others); Fri, 27 Nov 2015 12:21:24 -0500 Received: from foss.arm.com ([217.140.101.70]:50593 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755065AbbK0RVV (ORCPT ); Fri, 27 Nov 2015 12:21:21 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76F5149; Fri, 27 Nov 2015 09:21:02 -0800 (PST) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 72C363F2E5; Fri, 27 Nov 2015 09:21:16 -0800 (PST) From: Sudeep Holla To: Linus Walleij , linux-gpio@vger.kernel.org Cc: Sudeep Holla , linux-kernel@vger.kernel.org, Sudeep Holla Subject: [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Date: Fri, 27 Nov 2015 17:21:00 +0000 Message-Id: <1448644860-29323-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1448644860-29323-1-git-send-email-sudeep.holla@arm.com> References: <1448644860-29323-1-git-send-email-sudeep.holla@arm.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Sudeep Holla The IRQF_NO_SUSPEND flag is used to identify the interrupts that should be left enabled so as to allow them to work as expected during the suspend-resume cycle, but doesn't guarantee that it will wake the system from a suspended state, enable_irq_wake is recommended to be used for the wakeup. This patch removes the use of IRQF_NO_SUSPEND flags replacing it with irq_set_irq_wake instead. Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Sudeep Holla --- drivers/pinctrl/pinctrl-single.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 945a7d0f0704..a1e32c6b554a 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1622,12 +1622,14 @@ static void pcs_irq_unmask(struct irq_data *d) */ static int pcs_irq_set_wake(struct irq_data *d, unsigned int state) { + struct pcs_soc_data *pcs_soc = irq_data_get_irq_chip_data(d); + if (state) pcs_irq_unmask(d); else pcs_irq_mask(d); - return 0; + return irq_set_irq_wake(pcs_soc->irq, state); } /** @@ -1763,8 +1765,7 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs, int res; res = request_irq(pcs_soc->irq, pcs_irq_handler, - IRQF_SHARED | IRQF_NO_SUSPEND | - IRQF_NO_THREAD, + IRQF_SHARED | IRQF_NO_THREAD, name, pcs_soc); if (res) { pcs_soc->irq = -1;