From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: Threaded interrupts for synaptic touchscreen in HTC dream Date: Wed, 22 Jul 2009 10:13:31 -0700 Message-ID: <200907221013.32087.david-b@pacbell.net> References: <20090721113642.GC13286@sirena.org.uk> <20090722155811.GA2775@dtor-d630.eng.vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thomas Gleixner Cc: Dmitry Torokhov , Mark Brown , Trilok Soni , Pavel Machek , Arve Hj?nnev?g , kernel list , Brian Swetland , linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Joonyoung Shim , m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, t.fujak-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, Peter Zijlstra , Daniel Ribeiro List-Id: linux-i2c@vger.kernel.org On Wednesday 22 July 2009, Thomas Gleixner wrote: > > > 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. Except for the "development board" family of exceptions to such rules ... or the "Processor-on-Card" model, where the same platform/card gets used in a variety of different chassis configurations, with different peripherals. It may not be possible to know *which* configuration is being used at board setup time. However it most certainly is known by the time a driver is configuring.