Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753715AbZGVQlW (ORCPT ); Wed, 22 Jul 2009 12:41:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753684AbZGVQlV (ORCPT ); Wed, 22 Jul 2009 12:41:21 -0400 Received: from www.tglx.de ([62.245.132.106]:38241 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753399AbZGVQlU (ORCPT ); Wed, 22 Jul 2009 12:41:20 -0400 Date: Wed, 22 Jul 2009 18:40:21 +0200 (CEST) From: Thomas Gleixner To: Dmitry Torokhov cc: Mark Brown , Trilok Soni , Pavel Machek , Arve Hj?nnev?g , kernel list , Brian Swetland , linux-input@vger.kernel.org, Andrew Morton , linux-i2c@vger.kernel.org, Joonyoung Shim , m.szyprowski@samsung.com, t.fujak@samsung.com, kyungmin.park@samsung.com, David Brownell , Peter Zijlstra , Daniel Ribeiro Subject: Re: Threaded interrupts for synaptic touchscreen in HTC dream In-Reply-To: <20090722155811.GA2775@dtor-d630.eng.vmware.com> Message-ID: References: <20090721113642.GC13286@sirena.org.uk> <5d5443650907210518i6ee4df1evdc04d9ae9453707c@mail.gmail.com> <5d5443650907210530x4aaa03d6gd47ef5f79a3ef8a4@mail.gmail.com> <20090721124933.GA5668@rakim.wolfsonmicro.main> <20090721160436.GD4352@dtor-d630.eng.vmware.com> <20090721222547.GA1948@opensource.wolfsonmicro.com> <20090722121800.GD21171@rakim.wolfsonmicro.main> <20090722155811.GA2775@dtor-d630.eng.vmware.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1750 Lines: 42 On Wed, 22 Jul 2009, Dmitry Torokhov wrote: > > I don't think it belongs into the driver code. It belongs into the > > platform code which sets up the system and knows what's on which > > interrupt line. > > > > I do think this should be set up by the driver - the platform/arch code > can't be 100% certain what model of servicing interrupts driver will > chose, nor the driver can know whether arch code set things up for > threaded or classic interrupt handling. > > Since handle_level_oneshot_irq requires drivers to use threaded IRQ > model (in absence of thread interrupt will never be unmasked) it would > be better if we did set it up automatically, right there in > request_threaded_irq(). This would reduce maintenance issues between > platform and driver code. No, it's the wrong way round. The platform code sets up the platform devices. So there is no real good reason that the platform code does not know about the details. If it conveys the wrong irq number then it wont work, if it sets the wrong handler it wont work either. So what ? If the driver is implemented to use a threaded handler, which it better is no matter what as it uses a bus, and the interrupt controller logic is proper implemented as well then the driver does not care about those details at all. It will magically work with any interrupt controller you put in front of it. If the platform maintainer sets the wrong handler or the wrong platform data then it's not the driver writers problem. Thanks, tglx -- 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/