From patchwork Thu Feb 3 14:10:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iiro Valkonen X-Patchwork-Id: 529431 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p13EBAxQ013414 for ; Thu, 3 Feb 2011 14:11:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932191Ab1BCOKr (ORCPT ); Thu, 3 Feb 2011 09:10:47 -0500 Received: from newsmtp5.atmel.com ([204.2.163.5]:26296 "EHLO sjogate2.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932113Ab1BCOKr (ORCPT ); Thu, 3 Feb 2011 09:10:47 -0500 Received: from csomb01.corp.atmel.com ([10.95.30.150]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id p13E86NQ028590; Thu, 3 Feb 2011 06:08:06 -0800 (PST) Received: from hammb01.corp.atmel.com ([10.142.130.20]) by csomb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Feb 2011 07:10:44 -0700 Received: from [10.191.100.77] ([10.191.100.77]) by hammb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Feb 2011 14:10:38 +0000 Message-ID: <4D4AB770.7090407@atmel.com> Date: Thu, 03 Feb 2011 16:10:56 +0200 From: Iiro Valkonen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Dmitry Torokhov CC: Trilok Soni , linux-input@vger.kernel.org Subject: [PATCH 4/5] Try IRQF_TRIGGER_NONE if IRQF_TRIGGER_FALLING returns error References: <4D3DAE3C.6060806@atmel.com> <20110124170756.GB31066@core.coreip.homeip.net> <4D3EA7DD.6000601@atmel.com> <20110203074318.GA5814@core.coreip.homeip.net> In-Reply-To: <20110203074318.GA5814@core.coreip.homeip.net> X-OriginalArrivalTime: 03 Feb 2011 14:10:43.0101 (UTC) FILETIME=[24E59CD0:01CBC3AC] 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Feb 2011 14:11:10 +0000 (UTC) diff --git a/drivers/input/touchscreen/qt602240_ts.c b/drivers/input/touchscreen/qt602240_ts.c index a88ec93..208d9f7 100644 --- a/drivers/input/touchscreen/qt602240_ts.c +++ b/drivers/input/touchscreen/qt602240_ts.c @@ -1165,6 +1165,15 @@ static int __devinit mxt_probe(struct i2c_client *client, error = request_threaded_irq(client->irq, NULL, mxt_interrupt, IRQF_TRIGGER_FALLING, client->dev.driver->name, data); + + if (error) { + /* If registering an interrupt with falling edge didn't work, + try any edge. */ + error = request_threaded_irq(client->irq, NULL, mxt_interrupt, + IRQF_TRIGGER_NONE, + client->dev.driver->name, data); + } + if (error) { dev_err(&client->dev, "Failed to register interrupt\n"); goto err_free_object;