From patchwork Thu Apr 1 13:16:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemanth V X-Patchwork-Id: 90139 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o31DGTvt007601 for ; Thu, 1 Apr 2010 13:16:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754329Ab0DANQf (ORCPT ); Thu, 1 Apr 2010 09:16:35 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:59995 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752814Ab0DANQe (ORCPT ); Thu, 1 Apr 2010 09:16:34 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o31DGSNt014362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Apr 2010 08:16:28 -0500 Received: from dbdmail.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o31DGO3H006504; Thu, 1 Apr 2010 08:16:26 -0500 (CDT) Received: from 10.24.255.17 (SquirrelMail authenticated user x0099946); by dbdmail.itg.ti.com with HTTP; Thu, 1 Apr 2010 18:46:27 +0530 (IST) Message-ID: <37428.10.24.255.17.1270127787.squirrel@dbdmail.itg.ti.com> Date: Thu, 1 Apr 2010 18:46:27 +0530 (IST) Subject: [PATCH 2/2] [STAGING] Synaptic : Add threaded IRQ support From: "Hemanth V" To: gregkh@suse.de, devel@driverdev.osuosl.org Cc: pavel@ucw.cz, linux-input@vger.kernel.org, linux-omap@vger.kernel.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal References: In-Reply-To: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 01 Apr 2010 13:16:53 +0000 (UTC) diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c index 7c1b980..f2e333e 100644 --- a/drivers/staging/dream/synaptics_i2c_rmi.c +++ b/drivers/staging/dream/synaptics_i2c_rmi.c @@ -198,8 +198,6 @@ static void synaptics_ts_work_func(struct work_struct *work) decode_report(ts, buf); } - if (ts->use_irq) - enable_irq(ts->client->irq); } static enum hrtimer_restart synaptics_ts_timer_func(struct hrtimer *timer) @@ -217,8 +215,7 @@ static irqreturn_t synaptics_ts_irq_handler(int irq, void *dev_id) { struct synaptics_ts_data *ts = dev_id; - disable_irq_nosync(ts->client->irq); - queue_work(synaptics_wq, &ts->work); + synaptics_ts_work_func(&ts->work); return IRQ_HANDLED; } @@ -484,8 +481,10 @@ static int __devinit synaptics_ts_probe( goto err_input_register_device_failed; } if (client->irq) { - ret = request_irq(client->irq, synaptics_ts_irq_handler, - 0, client->name, ts); + ret = request_threaded_irq(client->irq, NULL, + synaptics_ts_irq_handler, + IRQF_TRIGGER_LOW|IRQF_ONESHOT, + client->name, ts); if (ret == 0) { ret = i2c_set(ts, 0xf1, 0x01, "enable abs int"); if (ret)