From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dmitry Torokhov" Subject: Re: [PATCH try #2] Input/Joystick Driver: add support AD7142 joystick driver Date: Fri, 12 Oct 2007 11:50:12 -0400 Message-ID: References: <1192174727.6247.20.camel@roc-laptop> <1192203593.7089.4.camel@roc-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1192203593.7089.4.camel@roc-laptop> Content-Disposition: inline Sender: owner-linux-input@atrey.karlin.mff.cuni.cz List-Help: List-Owner: List-Post: List-Unsubscribe: To: bryan.wu@analog.com Cc: linux-input@atrey.karlin.mff.cuni.cz, linux-joystick@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org, akpm@linux-foundation.org List-Id: linux-input@vger.kernel.org On 10/12/07, Bryan Wu wrote: > On Fri, 2007-10-12 at 10:49 -0400, Dmitry Torokhov wrote: > > Hi Bryan, > > > > On 10/12/07, Bryan Wu wrote: > > > + > [snip] > > > + > > > +static void ad7142_close(struct input_dev *dev) > > > +{ > > > + free_irq(CONFIG_BFIN_JOYSTICK_IRQ_PFX, ad7142_interrupt); > > > + kthread_stop(ad7142_task); > > > > Don't you need to write something over i2c to shut the devoce off? > > What stops it from continuing to generate interrupts? > > > Actually, I am going to use "completion" to replace the whole > wait_interrupt_xxx and intr_flag things which original from Aubrey. How > do you think of that? > I don't think it is a very good idea - for me completion is one-time deal. You use it and then you are done. How about firing a work from interrupt and either rely on the default workqueue (keventd) or create your own to execute it? Thank you. -- Dmitry