Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbZGVXaS (ORCPT ); Wed, 22 Jul 2009 19:30:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754697AbZGVXaR (ORCPT ); Wed, 22 Jul 2009 19:30:17 -0400 Received: from qw-out-2122.google.com ([74.125.92.26]:47553 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754658AbZGVXaQ convert rfc822-to-8bit (ORCPT ); Wed, 22 Jul 2009 19:30:16 -0400 MIME-Version: 1.0 In-Reply-To: <200907221515.07835.david-b@pacbell.net> References: <5d5443650907151033w36008b71pe4b32bcea9489b75@mail.gmail.com> <200907221515.07835.david-b@pacbell.net> Date: Wed, 22 Jul 2009 16:30:15 -0700 Message-ID: Subject: Re: Threaded interrupts for synaptic touchscreen in HTC dream From: =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= To: David Brownell Cc: Thomas Gleixner , Peter Zijlstra , Mark Brown , Dmitry Torokhov , Trilok Soni , Pavel Machek , 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, Daniel Ribeiro Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1962 Lines: 42 2009/7/22 David Brownell : > On Wednesday 22 July 2009, Arve Hj?nnev?g wrote: >> It would also be useful to mask an edge triggered interrupt until the >> thread handler has finished. The touchscreen on the G1 is connected to >> an edge triggered interrupt, and the touchscreen may toggle the >> interrupt line while reading its registers. > > To clarify: ?if it does toggle, do you want that event to be > queued up so the IRQ is re-issued -- or not? ?That "oneshot" > mechanism does some of that, though it's for level triggers. For this driver yes the event should normally be queued up. If there is an error detected though, there is no need to queue up interrupts that are generated during the reinit. Also, if you implement a keypad matrix driver using a threaded interrupt handler, you will not want the interrupt to be re-issues unless it occured after the last key was released since the scan itself always generated more interrupts. This is not specific to threaded interrupt handlers though, and could be handled by adding a clear-interrupt function. > > Parts of that might be appropriate to handle in the threaded > IRQ handler itself. ?It seems a bit device-specific. Yes, the driver could request a threaded one-shot interrupt so that it will work when it is connected to a level triggered interrupt, and also call disable_interrupt/enable_interrrupt in the handler to avoid extra interrupts when it is connected to an edge triggered source. But, it would be nicer if requesting a one-shot interrupt always works. Also, waiting until the threaded handler runs before masking the interrupt would not work well if the interrupt line needs software debouncing. -- Arve Hj?nnev?g -- 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/