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: 8182731 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0D6969FC36 for ; Mon, 1 Feb 2016 18:28:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40833203A5 for ; Mon, 1 Feb 2016 18:28:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B631A203AC for ; Mon, 1 Feb 2016 18:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbcBAS2d (ORCPT ); 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 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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(-) 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;