From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754288AbbDOIv1 (ORCPT ); Wed, 15 Apr 2015 04:51:27 -0400 Received: from down.free-electrons.com ([37.187.137.238]:59861 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753934AbbDOIvS (ORCPT ); Wed, 15 Apr 2015 04:51:18 -0400 Message-ID: <552E2683.8090107@free-electrons.com> Date: Wed, 15 Apr 2015 10:51:15 +0200 From: Gregory CLEMENT User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Roger Quadros CC: tglx@linutronix.de, cw00.choi@samsung.com, balbi@ti.com, tony@atomide.com, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] genirq: provide dummy set_irq_wake() References: <1427721345-6402-1-git-send-email-rogerq@ti.com> <552CE847.7060103@ti.com> <552D1DEF.6080303@free-electrons.com> <552E1C4A.7060503@ti.com> In-Reply-To: <552E1C4A.7060503@ti.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Roger, On 15/04/2015 10:07, Roger Quadros wrote: > Hi Gregory, > > On 14/04/15 17:02, Gregory CLEMENT wrote: >> Hi Roger, >> >> On 14/04/2015 12:13, Roger Quadros wrote: >>> Hi Thomas, >>> >>> On 30/03/15 16:15, Roger Quadros wrote: >>>> Without this system suspend is broken on systems that have >>>> drivers calling enable/disable_irq_wake() for interrupts based off >>>> the dummy irq hook. >>>> (e.g. drivers/gpio/gpio-pcf857x.c) >>>> >>>> http://article.gmane.org/gmane.linux.kernel/1879035 >>>> >>>> Signed-off-by: Roger Quadros >>> >>> Any comments on this patch? >> >> I read the url you pointed and I wonder why, at then end, did >> you choose to add a dummy set_irq_wake() instead of using >> IRQCHIP_SKIP_SET_WAKE ? > > You mean like this? > > diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c > index 988dc58..2feb6fe 100644 > --- a/kernel/irq/dummychip.c > +++ b/kernel/irq/dummychip.c > @@ -57,5 +57,6 @@ struct irq_chip dummy_irq_chip = { > .irq_ack = noop, > .irq_mask = noop, > .irq_unmask = noop, > + .flags = IRQCHIP_SKIP_SET_WAKE, > }; > EXPORT_SYMBOL_GPL(dummy_irq_chip); Yes exactly. > > This works as well and is better. I'll post a v2. Thanks, Gregory > > cheers, > -roger > >>> >>>> --- >>>> kernel/irq/dummychip.c | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c >>>> index 988dc58..2405d7a 100644 >>>> --- a/kernel/irq/dummychip.c >>>> +++ b/kernel/irq/dummychip.c >>>> @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data) >>>> return 0; >>>> } >>>> >>>> +static int noop_int_ret(struct irq_data *data, unsigned int val) >>>> +{ >>>> + return 0; >>>> +} >>>> + >>>> /* >>>> * Generic no controller implementation >>>> */ >>>> @@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = { >>>> .irq_ack = noop, >>>> .irq_mask = noop, >>>> .irq_unmask = noop, >>>> + .irq_set_wake = noop_int_ret, >>>> }; >>>> EXPORT_SYMBOL_GPL(dummy_irq_chip); >>>> >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >> >> > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com