Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755205Ab2BUMEw (ORCPT ); Tue, 21 Feb 2012 07:04:52 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:64662 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754858Ab2BUMEv (ORCPT ); Tue, 21 Feb 2012 07:04:51 -0500 From: Arnd Bergmann To: Ashish Jangam Subject: Re: [PATCH 01/01] MFD: add ADC support to DA9052/53 MFD core v2 Date: Tue, 21 Feb 2012 12:04:45 +0000 User-Agent: KMail/1.12.2 (Linux/3.3.0-rc1; KDE/4.3.2; x86_64; ; ) Cc: broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, linux-kernel@vger.kernel.org, dajun.chen@diasemi.com References: <1329823897.30549.175.camel@dhruva> In-Reply-To: <1329823897.30549.175.camel@dhruva> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201202211204.45658.arnd@arndb.de> X-Provags-ID: V02:K0:ZiyTq6TplRiClZTKIFNh2RM3s/4IEXyxXCNq/SfAg3M gIIwCLBDM+iTverfVTHIjcwaILgScdMoM3T1272XZLoh9dEAoR J1RgTbuzeKB4GwMUFCY/HfOTI16J/XYF60UaWkc3Gg/M2fV9lT WEaLjWZTJ5NZQuER5jEy6j/8toLYsa4oGB8tbeAakcaj8UuTzJ rCgK1dquTTxwFpZq91B2OKtGLqCsScE7wZ6+0jrpE0hVj8gIoE 7YNm9FGTqzi3Cv6WYy+IPMKvwq8f2B6U/wuaAyiR4uEfbmO0LN UvGHq34HjR/EH1ZT/txO8NXbpu7+FhKNIWAXbGIZXCqKD2YHAv ZlsohziZ5OIDz34GWc2U= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 28 On Tuesday 21 February 2012, Ashish Jangam wrote: > > On Mon, Feb 20, 2012 at 12:07:27PM +0000, Arnd Bergmann wrote: > > > > > Also, I would recommend using request_irq instead of > > > request_threaded_irq here because the function only has a single > > > "complete()" call in it, just like a threaded IRQ handler has. There > > > is no point going through another thread just to wake up the one that is blocked. > > > > Actually in this case that won't work as the interrupt is generated by the chip interrupt controller and as the chip is I2C/SPI controlled it is itself threaded and can only generate threaded interrupts as genirq can't get back into hard interrupt context. > > > > As a result of this restriction when an interrupt handler doesn't care what context it runs in it's better to use request_any_context_irq(). > > This will do a normal IRQ when it can but will bind successfully to a threaded IRQ if that's what's provided. > > as threaded IRQs are only being used, request_any_context_irq() will > internally call request_threaded_irq() so is there any other need to > replace the current request_threaded_irq()? No, it's certainly ok to keep using request_threaded_irq, my suggestion was only in order to improve performance, which it will not do as Mark commented. I don't any strong reason one way or another. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/