From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755075AbbLDQ0p (ORCPT ); Fri, 4 Dec 2015 11:26:45 -0500 Received: from foss.arm.com ([217.140.101.70]:55316 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbbLDQ0n (ORCPT ); Fri, 4 Dec 2015 11:26:43 -0500 Subject: Re: [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag To: Grygorii Strashko , Tony Lindgren References: <1448644860-29323-1-git-send-email-sudeep.holla@arm.com> <1448644860-29323-2-git-send-email-sudeep.holla@arm.com> <20151203181337.GV23396@atomide.com> <566090FC.1020502@arm.com> <20151203214013.GB23396@atomide.com> <20151204154031.GG23396@atomide.com> <5661B4E7.2040405@arm.com> <5661BD22.7080600@ti.com> Cc: Sudeep Holla , Linus Walleij , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-omap@vger.kernel.org From: Sudeep Holla Organization: ARM Message-ID: <5661BEBF.9000106@arm.com> Date: Fri, 4 Dec 2015 16:26:39 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5661BD22.7080600@ti.com> 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 04/12/15 16:19, Grygorii Strashko wrote: > On 12/04/2015 05:44 PM, Sudeep Holla wrote: >> >> >> On 04/12/15 15:40, Tony Lindgren wrote: >>> * Tony Lindgren [151203 13:41]: >>>> * Sudeep Holla [151203 11:00]: >>>>> >>>>> I have added irq_set_irq_wake(pcs_soc->irq, state) in pcs_irq_set_wake >>>>> which ensures it's marked for wakeup. >>>> >>>> Hmm well see the error I pasted in this thread, maybe that provides >>>> more clues. >>> >>> The irq_set_irq_wake(pcs_soc->irq, state) in pcs_irq_set_wake does not >>> look right to me as pcs_irq_set_wake toggles the irq_wake for each pin >>> separately, not for the whole controller. >>> >> >> OK, my understanding was that this driver supports multiple single >> pinmux with one main irq `pcs_soc->irq`. Hence I added the wakeup on >> that irq. I now think that understand is wrong. >> > > With this change, PCS parent IRQ will be marked as wake up source as many > times as many pins were requested as wake up IRQs (protected by counter). > Most of all GPIO IRQ chips work this way. > Of course, if we will look on pinctrl-single.c from only OMAP point of view > then Prent IRQ can be marked as wake up source from probe only once. > But, since this driver expected to be generic - this patch is more correct, > because other HW may require to perform some real HW re-configuration to > enable/disable wake up capabilities for Parent IRQ in Parent IRQ controller. > Thanks for the detailed explanation. I was bit confused if my understanding is correct or not. > Any way, in my opinion, it's right and more safe to manage all wakeup IRQs > through IRQ PM core and Device wakeirq framework. And this patch should just > go together with platform changes and not alone. > Agreed, since I don't have platform to test, I will leave it you guys to pick up these patches when ready and with any changes if required. -- Regards, Sudeep