From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757232AbbIVJmr (ORCPT ); Tue, 22 Sep 2015 05:42:47 -0400 Received: from foss.arm.com ([217.140.101.70]:56943 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754207AbbIVJmp (ORCPT ); Tue, 22 Sep 2015 05:42:45 -0400 Subject: Re: [PATCH 16/17] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag To: Thomas Gleixner References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> <1442850433-5903-17-git-send-email-sudeep.holla@arm.com> Cc: Sudeep Holla , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Rafael J. Wysocki" , Linus Walleij , "linux-gpio@vger.kernel.org" From: Sudeep Holla Message-ID: <5601228F.5080403@arm.com> Date: Tue, 22 Sep 2015 10:42:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/15 19:53, Thomas Gleixner wrote: > On Mon, 21 Sep 2015, Sudeep Holla wrote: >> 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(-) >> >> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c >> index ef04b962c3d5..a5d0f0e52de1 100644 >> --- a/drivers/pinctrl/pinctrl-single.c >> +++ b/drivers/pinctrl/pinctrl-single.c >> @@ -1615,12 +1615,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); > > That's going to create at least a lockdep splat due to nesting > irq_desc->lock. > Ah right, I noted that I must fix it when you pointed out similar issue on the other thread[1]. I forgot later, sorry will look into that. Regards, Sudeep [1] https://lkml.org/lkml/2015/9/8/617