From patchwork Tue May 31 08:51:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 831762 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4V8pu8a011160 for ; Tue, 31 May 2011 08:51:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755355Ab1EaIvz (ORCPT ); Tue, 31 May 2011 04:51:55 -0400 Received: from comu.ring0.de ([46.4.151.82]:48630 "EHLO smtp.ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753952Ab1EaIvy (ORCPT ); Tue, 31 May 2011 04:51:54 -0400 Received: by smtp.ring0.de (Postfix, from userid 505) id 67A8C817B6; Tue, 31 May 2011 08:51:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on comu.ring0.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Report: * -2.6 BAYES_00 BODY: Spamwahrscheinlichkeit nach Bayes-Test: 0-1% * [score: 0.0000] * 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS * 0.2 AWL AWL: From: address is in the auto white-list Received: from sre.ring0.de (unknown [134.106.131.183]) by smtp.ring0.de (Postfix) with ESMTP id D9569817B5; Tue, 31 May 2011 08:51:39 +0000 (UTC) Date: Tue, 31 May 2011 10:51:39 +0200 From: Sebastian Reichel To: linux-omap@vger.kernel.org Cc: tony@atomide.com, John Stultz , a.zummo@towertech.it, rtc-linux@googlegroups.com, balajitk@ti.com, Ilkka Koskinen Subject: Re: [PATCH] rtc-twl: Switch to using threaded irq Message-ID: <20110531085139.GA7290@earth.universe> References: <1300291634-17884-1-git-send-email-ilkka.koskinen@nokia.com> <4F5287B0C366D047BF44025F9ED7BB43E9D7@008-AM1MPN1-001.mgdnok.nokia.com> <1305242664.2680.28.camel@work-vm> <4DD41BE5.4050600@kolumbus.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4DD41BE5.4050600@kolumbus.fi> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 08:51:56 +0000 (UTC) Hi, I think the patch should also remove the local_irq_enable() call in twl_rtc_interrupt, since it's no longer needed with threaded irq. At least on the Pandaboard the RTC is still working with the appended patch. -- Sebastian > >> On Apr 13, 2011 Krishnamoorthy, Balaji T wrote: > >>> On Wed, Mar 16, 2011 at 9:37 PM, Ilkka Koskinen > >> wrote: > >>>> > >>>> The driver is accessing to i2c bus in interrupt handler. > >>>> Therefore, it should use threaded irq. > >> > >>> Acked-by: Balaji T K > >> > >>>> > >>>> Signed-off-by: Ilkka Koskinen > >>>> --- > >>>> drivers/rtc/rtc-twl.c | 2 +- > >>>> 1 files changed, 1 insertions(+), 1 deletions(-) > >>>> > >>>> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c > >>>> index ed1b868..2715b96 100644 > >>>> --- a/drivers/rtc/rtc-twl.c > >>>> +++ b/drivers/rtc/rtc-twl.c > >>>> @@ -475,7 +475,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) > >>>> if (ret < 0) > >>>> goto out1; > >>>> > >>>> - ret = request_irq(irq, twl_rtc_interrupt, > >>>> + ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, > >>>> IRQF_TRIGGER_RISING, > >>>> dev_name(&rtc->dev), rtc); > >>>> if (ret < 0) { > >>>> -- > >>>> 1.7.0.4 --- a/drivers/rtc/rtc-twl.c 2011-05-19 06:06:34.000000000 +0200 +++ b/drivers/rtc/rtc-twl.c 2011-05-26 20:34:03.000000000 +0200 @@ -362,14 +362,6 @@ int res; u8 rd_reg; -#ifdef CONFIG_LOCKDEP - /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which - * we don't want and can't tolerate. Although it might be - * friendlier not to borrow this thread context... - */ - local_irq_enable(); -#endif - res = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); if (res) goto out; @@ -462,7 +454,7 @@ if (ret < 0) goto out1; - ret = request_irq(irq, twl_rtc_interrupt, + ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, IRQF_TRIGGER_RISING, dev_name(&rtc->dev), rtc); if (ret < 0) {