From patchwork Mon Feb 1 18:28:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 60960 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp213869lbb; Mon, 1 Feb 2016 10:28:40 -0800 (PST) X-Received: by 10.66.177.193 with SMTP id cs1mr40656300pac.132.1454351314410; Mon, 01 Feb 2016 10:28:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id we2si25663988pac.127.2016.02.01.10.28.34; Mon, 01 Feb 2016 10:28:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbcBAS2d (ORCPT + 3 others); Mon, 1 Feb 2016 13:28:33 -0500 Received: from foss.arm.com ([217.140.101.70]:50847 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbcBAS2b (ORCPT ); Mon, 1 Feb 2016 13:28:31 -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 44B244AB; Mon, 1 Feb 2016 10:27:47 -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 4DD8E3F246; Mon, 1 Feb 2016 10:28:29 -0800 (PST) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, Tony Lindgren , Grygorii Strashko Cc: Sudeep Holla , linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij , Sudeep Holla , Haojian Zhuang Subject: [PATCH 2/3] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Date: Mon, 1 Feb 2016 18:28:18 +0000 Message-Id: <1454351299-27440-3-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454351299-27440-1-git-send-email-sudeep.holla@arm.com> References: <1454351299-27440-1-git-send-email-sudeep.holla@arm.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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: Haojian Zhuang 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-omap" 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 fb126d56ad40..03977a75a9e2 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1619,12 +1619,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); } /** @@ -1760,8 +1762,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;